org.apache.portals.gems.flash
Class SWFHeader
java.lang.Object
org.apache.portals.gems.flash.SWFHeader
public class SWFHeader
- extends java.lang.Object
- Author:
- brooks
Field Summary |
static java.lang.String |
COMPRESSED
|
protected org.apache.commons.logging.Log |
log
|
static java.lang.String |
UNCOMPRESSED
|
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 java.lang.String COMPRESSED
- See Also:
- Constant Field Values
UNCOMPRESSED
public static final java.lang.String UNCOMPRESSED
- See Also:
- Constant Field Values
SWFHeader
public SWFHeader()
parseHeader
public boolean parseHeader(java.lang.String fileName)
parseHeader
public boolean parseHeader(java.io.File file)
parseHeader
public boolean parseHeader(java.io.InputStream is)
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 java.util.zip.DataFormatException
- Throws:
java.util.zip.DataFormatException
readSize
public int readSize(byte[] bytes)
strip
public byte[] strip(byte[] bytes)
main
public static void main(java.lang.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 java.lang.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 java.lang.String getCompressionType()
- Returns:
- the compressionType
getHeight
public int getHeight()
- Returns:
- the height
getWidth
public int getWidth()
- Returns:
- the width
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.