org.freehep.graphicsio.swf
Class SWFOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.freehep.util.io.CompressableOutputStream
              extended by org.freehep.util.io.BitOutputStream
                  extended by org.freehep.util.io.ByteOrderOutputStream
                      extended by org.freehep.util.io.ByteCountOutputStream
                          extended by org.freehep.util.io.TaggedOutputStream
                              extended by org.freehep.graphicsio.swf.SWFOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.DataOutput, java.io.Flushable, SWFConstants, org.freehep.util.io.FinishableOutputStream, org.freehep.util.io.TaggedOutput

public class SWFOutputStream
extends org.freehep.util.io.TaggedOutputStream
implements SWFConstants

This class extends the TaggedOutputStream with several methods to write SWF primitives to the stream and to write TagHeaders.

Version:
$Id: SWFOutputStream.java 9976 2006-11-27 18:25:46Z duns $
Author:
Mark Donszelmann, Charles Loomis

Field Summary
 
Fields inherited from class org.freehep.util.io.TaggedOutputStream
actionSet, tagSet
 
Fields inherited from class org.freehep.util.io.ByteOrderOutputStream
little, written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Fields inherited from interface org.freehep.graphicsio.swf.SWFConstants
CONTROL, DEFAULT_VERSION, DEFINITION, LANGUAGE_JAPANESE, LANGUAGE_KOREAN, LANGUAGE_LATIN, LANGUAGE_SIMPLIFIED_CHINESE, LANGUAGE_TRADITIONAL_CHINESE, TWIPS
 
Constructor Summary
SWFOutputStream(java.io.OutputStream os, java.awt.Dimension size, float frameRate, boolean compress)
           
SWFOutputStream(java.io.OutputStream os, int version, java.awt.Dimension size, float frameRate, boolean compress)
           
SWFOutputStream(java.io.OutputStream os, SWFTagSet tagSet, SWFActionSet actionSet, java.awt.Dimension size, float frameRate, boolean compress)
           
 
Method Summary
 void close()
           
 int getVersion()
           
protected  void writeActionHeader(org.freehep.util.io.ActionHeader header)
           
 void writeColor(java.awt.Color color, boolean alpha)
           
 void writeFixed(double d)
           
 void writeFixed8(double d)
           
 void writeHeader(SWFHeader header)
           
 void writeLanguageCode(int code)
           
 void writeMatrix(java.awt.geom.AffineTransform matrix)
           
 void writeRect(java.awt.geom.Rectangle2D rect)
           
 void writeRect(java.awt.geom.Rectangle2D rect, int nbits)
           
 void writeString(java.lang.String s)
           
 void writeTag(ShowFrame tag)
           
protected  void writeTagHeader(org.freehep.util.io.TagHeader tagHeader)
           
 
Methods inherited from class org.freehep.util.io.TaggedOutputStream
createTagHeader, getTagAlignment, writeAction, writeTag
 
Methods inherited from class org.freehep.util.io.ByteCountOutputStream
append, getBufferLength, getLength, popBuffer, popBufferBytes, pushBuffer, write
 
Methods inherited from class org.freehep.util.io.ByteOrderOutputStream
size, writeAsciiZString, writeBoolean, writeByte, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeInt, writeLong, writeShort, writeShort, writeUnsignedByte, writeUnsignedByte, writeUnsignedInt, writeUnsignedInt, writeUnsignedShort, writeUnsignedShort, writeUTF, writeUTF
 
Methods inherited from class org.freehep.util.io.BitOutputStream
byteAlign, finish, flushByte, minBits, minBits, minBits, writeBitFlag, writeFBits, writeSBits, writeUBits
 
Methods inherited from class org.freehep.util.io.CompressableOutputStream
startCompressing, write
 
Methods inherited from class java.io.FilterOutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write, write
 

Constructor Detail

SWFOutputStream

public SWFOutputStream(java.io.OutputStream os,
                       java.awt.Dimension size,
                       float frameRate,
                       boolean compress)
                throws java.io.IOException
Throws:
java.io.IOException

SWFOutputStream

public SWFOutputStream(java.io.OutputStream os,
                       int version,
                       java.awt.Dimension size,
                       float frameRate,
                       boolean compress)
                throws java.io.IOException
Throws:
java.io.IOException

SWFOutputStream

public SWFOutputStream(java.io.OutputStream os,
                       SWFTagSet tagSet,
                       SWFActionSet actionSet,
                       java.awt.Dimension size,
                       float frameRate,
                       boolean compress)
                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in interface org.freehep.util.io.TaggedOutput
Overrides:
close in class org.freehep.util.io.ByteCountOutputStream
Throws:
java.io.IOException

writeTag

public void writeTag(ShowFrame tag)
              throws java.io.IOException
Throws:
java.io.IOException

writeFixed

public void writeFixed(double d)
                throws java.io.IOException
Throws:
java.io.IOException

writeFixed8

public void writeFixed8(double d)
                 throws java.io.IOException
Throws:
java.io.IOException

writeRect

public void writeRect(java.awt.geom.Rectangle2D rect)
               throws java.io.IOException
Throws:
java.io.IOException

writeRect

public void writeRect(java.awt.geom.Rectangle2D rect,
                      int nbits)
               throws java.io.IOException
Throws:
java.io.IOException

writeColor

public void writeColor(java.awt.Color color,
                       boolean alpha)
                throws java.io.IOException
Throws:
java.io.IOException

writeMatrix

public void writeMatrix(java.awt.geom.AffineTransform matrix)
                 throws java.io.IOException
Throws:
java.io.IOException

writeString

public void writeString(java.lang.String s)
                 throws java.io.IOException
Overrides:
writeString in class org.freehep.util.io.ByteOrderOutputStream
Throws:
java.io.IOException

writeLanguageCode

public void writeLanguageCode(int code)
                       throws java.io.IOException
Throws:
java.io.IOException

writeTagHeader

protected void writeTagHeader(org.freehep.util.io.TagHeader tagHeader)
                       throws java.io.IOException
Specified by:
writeTagHeader in class org.freehep.util.io.TaggedOutputStream
Throws:
java.io.IOException

writeActionHeader

protected void writeActionHeader(org.freehep.util.io.ActionHeader header)
                          throws java.io.IOException
Specified by:
writeActionHeader in class org.freehep.util.io.TaggedOutputStream
Throws:
java.io.IOException

writeHeader

public void writeHeader(SWFHeader header)
                 throws java.io.IOException
Throws:
java.io.IOException

getVersion

public int getVersion()


Copyright © 2000-2007 FreeHEP. All Rights Reserved.