org.apache.portals.gems.flash
Class SWFHeader

java.lang.Object
  extended by 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
           
 
Constructor Summary
SWFHeader()
           
 
Method Summary
 int convertPixelsToTwips(int pixels)
           
 int convertTwipsToPixels(int twips)
           
 void dumpHeaderToStdOut()
           
 java.lang.String getCompressionType()
           
 int getFrameCount()
           
 int getFrameRate()
           
 int getHeight()
           
 int getNbits()
           
 java.lang.String getSignature()
           
 long getSize()
           
 int getVersion()
           
 int getWidth()
           
 int getXmax()
           
 int getYmax()
           
 boolean isCompressed()
           
 boolean isCompressed(int firstByte)
           
 boolean isSWF(byte[] signature)
           
static void main(java.lang.String[] args)
           
 boolean parseHeader(java.io.File file)
           
 boolean parseHeader(java.io.InputStream is)
           
 boolean parseHeader(java.lang.String fileName)
           
 void read(byte[] output, byte[] input, int offset)
           
 PackedBitObj readPackedBits(byte[] bytes, int byteMarker, int bitMarker, int length)
           
 int readSize(byte[] bytes)
           
 byte[] strip(byte[] bytes)
           
protected  byte[] uncompressHeader(byte[] bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

SWFHeader

public SWFHeader()
Method Detail

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-2009 Apache Software Foundation. All Rights Reserved.