org.riotfamily.common.util
Class FlashInfo
java.lang.Object
org.riotfamily.common.util.FlashInfo
public class FlashInfo
- extends Object
- Author:
- brooks
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected RiotLog log
COMPRESSED
public static String COMPRESSED
UNCOMPRESSED
public static String UNCOMPRESSED
FlashInfo
public FlashInfo(File file)
throws IOException
- Throws:
IOException
parseHeader
public boolean parseHeader(File file)
throws IOException
- Throws:
IOException
read
public void read(byte[] output,
byte[] input,
int offset)
readSize
public int readSize(byte[] bytes)
readPackedBits
public FlashInfo.PackedBitObj readPackedBits(byte[] bytes,
int byteMarker,
int bitMarker,
int length)
convertTwipsToPixels
public int convertTwipsToPixels(int twips)
convertPixelsToTwips
public int convertPixelsToTwips(int pixels)
isSWF
public boolean isSWF(byte[] signature)
isCompressed
public boolean isCompressed(int firstByte)
compress
public byte[] compress(byte[] bytes,
int length)
decompress
public byte[] decompress(byte[] bytes)
throws DataFormatException
- Throws:
DataFormatException
getFrameCount
public int getFrameCount()
- Returns:
- the frameCount
getFrameRate
public int getFrameRate()
- Returns:
- the frameRate
getNbits
public int getNbits()
- Returns:
- the nbits
getSignature
public String getSignature()
- Returns:
- the signature
getSize
public long getSize()
- Returns:
- the size
getVersion
public int getVersion()
- Returns:
- the version
getXmax
public int getXmax()
- Returns:
- the xmax
getYmax
public int getYmax()
- Returns:
- the ymax
getCompressionType
public String getCompressionType()
- Returns:
- the compressionType
getHeight
public int getHeight()
- Returns:
- the height
getWidth
public int getWidth()
- Returns:
- the width
isValid
public boolean isValid()
- Returns:
- true if no exception occured during parsing