FreeHEP API
Version current

org.freehep.graphicsio.swf
Class SWFOutputStream

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

public class SWFOutputStream
extends 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,v 1.9 2004/12/22 19:36:05 duns Exp $
Author:
Mark Donszelmann, Charles Loomis
Source Code:
SWFOutputStream.java

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(OutputStream os, Dimension size, float frameRate, boolean compress)
           
SWFOutputStream(OutputStream os, int version, Dimension size, float frameRate, boolean compress)
           
SWFOutputStream(OutputStream os, SWFTagSet tagSet, SWFActionSet actionSet, Dimension size, float frameRate, boolean compress)
           
 
Method Summary
 void close()
          closes the stream, inserting any non-written header.
 int getVersion()
           
protected  void writeActionHeader(ActionHeader header)
          Writes the ActionHeader, which includes an actionCode and a length
 void writeColor(Color color, boolean alpha)
           
 void writeFixed(double d)
           
 void writeHeader(SWFHeader header)
           
 void writeLanguageCode(int code)
           
 void writeMatrix(AffineTransform matrix)
           
 void writeRect(Rectangle2D rect)
           
 void writeRect(Rectangle2D rect, int nbits)
           
 void writeString(String s)
           
 void writeTag(ShowFrame tag)
           
protected  void writeTagHeader(TagHeader tagHeader)
          Writes the TagHeader, which includes a TagID and a length
 
Methods inherited from class org.freehep.util.io.TaggedOutputStream
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(OutputStream os,
                       Dimension size,
                       float frameRate,
                       boolean compress)
                throws IOException

SWFOutputStream

public SWFOutputStream(OutputStream os,
                       int version,
                       Dimension size,
                       float frameRate,
                       boolean compress)
                throws IOException

SWFOutputStream

public SWFOutputStream(OutputStream os,
                       SWFTagSet tagSet,
                       SWFActionSet actionSet,
                       Dimension size,
                       float frameRate,
                       boolean compress)
                throws IOException
Method Detail

close

public void close()
           throws IOException
Description copied from class: ByteCountOutputStream
closes the stream, inserting any non-written header.

Specified by:
close in interface TaggedOutput
Overrides:
close in class ByteCountOutputStream
Throws:
IOException

writeTag

public void writeTag(ShowFrame tag)
              throws IOException
Throws:
IOException

writeFixed

public void writeFixed(double d)
                throws IOException
Throws:
IOException

writeRect

public void writeRect(Rectangle2D rect)
               throws IOException
Throws:
IOException

writeRect

public void writeRect(Rectangle2D rect,
                      int nbits)
               throws IOException
Throws:
IOException

writeColor

public void writeColor(Color color,
                       boolean alpha)
                throws IOException
Throws:
IOException

writeMatrix

public void writeMatrix(AffineTransform matrix)
                 throws IOException
Throws:
IOException

writeString

public void writeString(String s)
                 throws IOException
Overrides:
writeString in class ByteOrderOutputStream
Throws:
IOException

writeLanguageCode

public void writeLanguageCode(int code)
                       throws IOException
Throws:
IOException

writeTagHeader

protected void writeTagHeader(TagHeader tagHeader)
                       throws IOException
Description copied from class: TaggedOutputStream
Writes the TagHeader, which includes a TagID and a length

Specified by:
writeTagHeader in class TaggedOutputStream
Throws:
IOException

writeActionHeader

protected void writeActionHeader(ActionHeader header)
                          throws IOException
Description copied from class: TaggedOutputStream
Writes the ActionHeader, which includes an actionCode and a length

Specified by:
writeActionHeader in class TaggedOutputStream
Throws:
IOException

writeHeader

public void writeHeader(SWFHeader header)
                 throws IOException
Throws:
IOException

getVersion

public int getVersion()

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.