FreeHEP API
Version current

org.freehep.graphicsio.emf
Class EMFOutputStream

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.emf.EMFOutputStream
All Implemented Interfaces:
DataOutput, FinishableOutputStream, TaggedOutput

public class EMFOutputStream
extends TaggedOutputStream

EMF Binary Output Stream. Tags written with this OutputStream will produce a binary EMF file.

Version:
$Id: EMFOutputStream.java,v 1.8 2002/08/06 14:59:16 duns Exp $
Author:
Mark Donszelmann
Source Code:
EMFOutputStream.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
 
Constructor Summary
EMFOutputStream(OutputStream os, Rectangle imageBounds, EMFHandleManager handles, String application, String name, Dimension device)
           
EMFOutputStream(OutputStream os, Rectangle imageBounds, EMFHandleManager handles, String application, String name, Dimension device, int version)
           
 
Method Summary
 void close()
          closes the stream, inserting any non-written header.
protected  int getTagAlignment()
          Specifies tag alignment 1 byte 2 short 4 int 8 long
 int getVersion()
           
protected  void writeActionHeader(ActionHeader header)
          Writes the ActionHeader, which includes an actionCode and a length
 void writeBYTE(boolean b)
           
 void writeBYTE(byte b)
           
 void writeBYTE(byte[] b)
           
 void writeBYTE(int b)
           
 void writeCOLOR16(Color c)
           
 void writeCOLORREF(Color c)
           
 void writeDWORD(boolean b)
           
 void writeDWORD(int i)
           
 void writeDWORD(int[] w)
           
 void writeFLOAT(float f)
           
 void writeHeader(EMFHeader header)
           
 void writeLONG(int i)
           
 void writePOINTL(int n, Point[] p)
           
 void writePOINTL(Point p)
           
 void writePOINTL(Point[] p)
           
 void writePOINTS(int n, Point[] p)
           
 void writePOINTS(Point p)
           
 void writePOINTS(Point[] p)
           
 void writeRECTL(Rectangle r)
           
 void writeSHORT(short i)
           
 void writeSIZEL(Dimension d)
           
 void writeTag(Tag tag)
          Write a tag.
protected  void writeTagHeader(TagHeader header)
          Writes the TagHeader, which includes a TagID and a length
 void writeUINT(int i)
           
 void writeULONG(int i)
           
 void writeWCHAR(String s)
           
 void writeWCHAR(String s, int size)
           
 void writeWORD(boolean b)
           
 void writeWORD(int s)
           
 void writeXFORM(AffineTransform t)
           
 
Methods inherited from class org.freehep.util.io.TaggedOutputStream
writeAction
 
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, writeString, 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

EMFOutputStream

public EMFOutputStream(OutputStream os,
                       Rectangle imageBounds,
                       EMFHandleManager handles,
                       String application,
                       String name,
                       Dimension device,
                       int version)
                throws IOException

EMFOutputStream

public EMFOutputStream(OutputStream os,
                       Rectangle imageBounds,
                       EMFHandleManager handles,
                       String application,
                       String name,
                       Dimension device)
                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

writeDWORD

public void writeDWORD(int i)
                throws IOException
Throws:
IOException

writeDWORD

public void writeDWORD(int[] w)
                throws IOException
Throws:
IOException

writeWORD

public void writeWORD(int s)
               throws IOException
Throws:
IOException

writeFLOAT

public void writeFLOAT(float f)
                throws IOException
Throws:
IOException

writeCOLORREF

public void writeCOLORREF(Color c)
                   throws IOException
Throws:
IOException

writeCOLOR16

public void writeCOLOR16(Color c)
                  throws IOException
Throws:
IOException

writeXFORM

public void writeXFORM(AffineTransform t)
                throws IOException
Throws:
IOException

writePOINTS

public void writePOINTS(Point[] p)
                 throws IOException
Throws:
IOException

writePOINTS

public void writePOINTS(int n,
                        Point[] p)
                 throws IOException
Throws:
IOException

writePOINTS

public void writePOINTS(Point p)
                 throws IOException
Throws:
IOException

writePOINTL

public void writePOINTL(Point[] p)
                 throws IOException
Throws:
IOException

writePOINTL

public void writePOINTL(int n,
                        Point[] p)
                 throws IOException
Throws:
IOException

writePOINTL

public void writePOINTL(Point p)
                 throws IOException
Throws:
IOException

writeRECTL

public void writeRECTL(Rectangle r)
                throws IOException
Throws:
IOException

writeSIZEL

public void writeSIZEL(Dimension d)
                throws IOException
Throws:
IOException

writeUINT

public void writeUINT(int i)
               throws IOException
Throws:
IOException

writeULONG

public void writeULONG(int i)
                throws IOException
Throws:
IOException

writeLONG

public void writeLONG(int i)
               throws IOException
Throws:
IOException

writeSHORT

public void writeSHORT(short i)
                throws IOException
Throws:
IOException

writeBYTE

public void writeBYTE(byte[] b)
               throws IOException
Throws:
IOException

writeBYTE

public void writeBYTE(byte b)
               throws IOException
Throws:
IOException

writeBYTE

public void writeBYTE(int b)
               throws IOException
Throws:
IOException

writeBYTE

public void writeBYTE(boolean b)
               throws IOException
Throws:
IOException

writeWORD

public void writeWORD(boolean b)
               throws IOException
Throws:
IOException

writeDWORD

public void writeDWORD(boolean b)
                throws IOException
Throws:
IOException

writeWCHAR

public void writeWCHAR(String s)
                throws IOException
Throws:
IOException

writeWCHAR

public void writeWCHAR(String s,
                       int size)
                throws IOException
Throws:
IOException

getTagAlignment

protected int getTagAlignment()
Description copied from class: TaggedOutputStream
Specifies tag alignment 1 byte 2 short 4 int 8 long

Overrides:
getTagAlignment in class TaggedOutputStream

writeTagHeader

protected void writeTagHeader(TagHeader header)
                       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

writeTag

public void writeTag(Tag tag)
              throws IOException
Description copied from class: TaggedOutputStream
Write a tag.

Specified by:
writeTag in interface TaggedOutput
Overrides:
writeTag 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(EMFHeader header)
                 throws IOException
Throws:
IOException

getVersion

public int getVersion()

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.