public class Header extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Header.Compression |
Modifier and Type | Field and Description |
---|---|
static char[] |
SIGNATURE_COMPRESSED_LZMA |
static char[] |
SIGNATURE_COMPRESSED_ZLIB |
static char[] |
SIGNATURE_UNCOMPRESSED |
Constructor and Description |
---|
Header()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static Header.Compression |
decideCompression(boolean compressed,
int swfVersion,
boolean debug)
Based on desire for compression, debug, and swf version, pick the
appropriate compression type
|
long |
getCompressedLength()
Length is the LZMA "compressedLength" from the header
|
Header.Compression |
getCompression()
Check if the SWF file uses compression.
|
int |
getFrameCount()
Get frame count.
|
float |
getFrameRate()
Get frame rate.
|
Rect |
getFrameSize()
Frame size in twips.
|
long |
getLength()
Length of entire file in bytes.
|
char[] |
getSignature()
SWF signature:
CWS - compressed
FWS - uncompressed
|
int |
getVersion()
SWF file version.
|
boolean |
isSignatureValid(char[] signature)
Determine if the signature is valid.
|
void |
setCompressedLength(long length) |
void |
setFrameCount(int frameCount) |
void |
setFrameRate(float frameRate) |
void |
setFrameSize(Rect frameSize) |
void |
setLength(long length) |
void |
setSignature(char[] signature) |
void |
setVersion(int version) |
String |
toString() |
public static final char[] SIGNATURE_COMPRESSED_ZLIB
public static final char[] SIGNATURE_COMPRESSED_LZMA
public static final char[] SIGNATURE_UNCOMPRESSED
public char[] getSignature()
public boolean isSignatureValid(char[] signature)
signature
- The signature to be checked.public void setSignature(char[] signature)
public int getVersion()
public void setVersion(int version)
public long getLength()
public long getCompressedLength()
public void setLength(long length)
public void setCompressedLength(long length)
public Rect getFrameSize()
public void setFrameSize(Rect frameSize)
public float getFrameRate()
public void setFrameRate(float frameRate)
public int getFrameCount()
public void setFrameCount(int frameCount)
public Header.Compression getCompression()
public static Header.Compression decideCompression(boolean compressed, int swfVersion, boolean debug)
Copyright © 2016 The Apache Software Foundation. All rights reserved.