org.apache.portals.gems.flash
Class SWFHeader
java.lang.Object
org.apache.portals.gems.flash.SWFHeader
public class SWFHeader
- extends Object
- Author:
- brooks
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected org.apache.commons.logging.Log log
COMPRESSED
public static final String COMPRESSED
- See Also:
- Constant Field Values
UNCOMPRESSED
public static final String UNCOMPRESSED
- See Also:
- Constant Field Values
signature
private String signature
compressionType
private String compressionType
version
private int version
size
private long size
nbits
private int nbits
xmax
private int xmax
ymax
private int ymax
width
private int width
height
private int height
frameRate
private int frameRate
frameCount
private int frameCount
SWFHeader
public SWFHeader()
parseHeader
public boolean parseHeader(String fileName)
parseHeader
public boolean parseHeader(File file)
parseHeader
public boolean parseHeader(InputStream is)
manageInputStreamAndParseHeader
private boolean manageInputStreamAndParseHeader(InputStream is,
File file)
doParseHeader
private boolean doParseHeader(InputStream is)
throws Exception
- Throws:
Exception
read
public void read(byte[] output,
byte[] input,
int offset)
readPackedBits
public 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)
isCompressed
public boolean isCompressed()
uncompressHeader
protected byte[] uncompressHeader(byte[] bytes)
throws DataFormatException
- Throws:
DataFormatException
readSize
public int readSize(byte[] bytes)
strip
public byte[] strip(byte[] bytes)
main
public static void main(String[] args)
- Parameters:
args
-
dumpHeaderToStdOut
public void dumpHeaderToStdOut()
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
Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.