pt.tumba.parser.swf
Class SWFWriter

java.lang.Object
  extended by pt.tumba.parser.swf.SWFWriter
All Implemented Interfaces:
SWFHeader, SWFTags

public class SWFWriter
extends java.lang.Object
implements SWFTags

Implements the SWFTags interface and writes a SWF file to the output stream

Author:
unknown

Field Summary
protected  java.io.ByteArrayOutputStream byteout
          Description of the Field
protected  java.lang.String filename
          Description of the Field
protected  int frameCount
          Description of the Field
protected  Rect frameSize
          Description of the Field
protected  int height
          Description of the Field
protected  OutStream out
          Description of the Field
protected  java.io.OutputStream outputstream
          Description of the Field
protected  int rate
          Description of the Field
protected  int version
          Description of the Field
 
Constructor Summary
SWFWriter(java.io.OutputStream outputstream)
          Constructor for the SWFWriter object
SWFWriter(OutStream outstream)
          Constructor for the SWFWriter object
SWFWriter(java.lang.String filename)
          Constructor for the SWFWriter object
 
Method Summary
protected  void finish()
          Finish writing
 void header(int version, long length2, int twipsWidth, int twipsHeight, int frameRate, int frameCount2)
          Interface SWFTags
 void tag(int tagType, boolean longTag2, byte[] contents)
          Interface SWFTags
protected  void writeHeader(int version, long length, int frameRate, int frameCount)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected OutStream out
Description of the Field


outputstream

protected java.io.OutputStream outputstream
Description of the Field


byteout

protected java.io.ByteArrayOutputStream byteout
Description of the Field


filename

protected java.lang.String filename
Description of the Field


frameCount

protected int frameCount
Description of the Field


version

protected int version
Description of the Field


frameSize

protected Rect frameSize
Description of the Field


height

protected int height
Description of the Field


rate

protected int rate
Description of the Field

Constructor Detail

SWFWriter

public SWFWriter(java.lang.String filename)
          throws java.io.FileNotFoundException
Constructor for the SWFWriter object

Parameters:
filename - Description of the Parameter
Throws:
java.io.FileNotFoundException - Description of the Exception

SWFWriter

public SWFWriter(java.io.OutputStream outputstream)
Constructor for the SWFWriter object

Parameters:
outputstream - Description of the Parameter

SWFWriter

public SWFWriter(OutStream outstream)
Constructor for the SWFWriter object

Parameters:
outstream - Description of the Parameter
Method Detail

header

public void header(int version,
                   long length2,
                   int twipsWidth,
                   int twipsHeight,
                   int frameRate,
                   int frameCount2)
            throws java.io.IOException
Interface SWFTags

Specified by:
header in interface SWFHeader
Parameters:
version - Description of the Parameter
length - Description of the Parameter
twipsWidth - Description of the Parameter
twipsHeight - Description of the Parameter
frameRate - Description of the Parameter
frameCount - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tag

public void tag(int tagType,
                boolean longTag2,
                byte[] contents)
         throws java.io.IOException
Interface SWFTags

Specified by:
tag in interface SWFTags
Parameters:
tagType - Description of the Parameter
longTag - Description of the Parameter
contents - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

writeHeader

protected void writeHeader(int version,
                           long length,
                           int frameRate,
                           int frameCount)
                    throws java.io.IOException
Description of the Method

Parameters:
version - Description of the Parameter
length - Description of the Parameter
frameRate - Description of the Parameter
frameCount - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

finish

protected void finish()
               throws java.io.IOException
Finish writing

Throws:
java.io.IOException - Description of the Exception