FreeHEP API
Version v1.2

org.freehep.graphicsio.emf
Class EMFOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--org.freehep.util.io.CompressableOutputStream
                    |
                    +--org.freehep.util.io.BitOutputStream
                          |
                          +--org.freehep.util.io.ByteOrderOutputStream
                                |
                                +--org.freehep.util.io.ByteCountOutputStream
                                      |
                                      +--org.freehep.util.io.TaggedOutputStream
                                            |
                                            +--org.freehep.graphicsio.emf.EMFOutputStream
All Implemented Interfaces:
DataOutput, FinishableOutputStream, ImageOutput, 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

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, pushBuffer, write
 
Methods inherited from class org.freehep.util.io.ByteOrderOutputStream
size, writeAsciiZString, writeBoolean, writeByte, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeImage, writeImage, 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
IOException

writeDWORD

public void writeDWORD(int i)
                throws IOException
IOException

writeDWORD

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

writeWORD

public void writeWORD(int s)
               throws IOException
IOException

writeFLOAT

public void writeFLOAT(float f)
                throws IOException
IOException

writeCOLORREF

public void writeCOLORREF(Color c)
                   throws IOException
IOException

writeCOLOR16

public void writeCOLOR16(Color c)
                  throws IOException
IOException

writeXFORM

public void writeXFORM(AffineTransform t)
                throws IOException
IOException

writePOINTS

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

writePOINTS

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

writePOINTS

public void writePOINTS(Point p)
                 throws IOException
IOException

writePOINTL

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

writePOINTL

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

writePOINTL

public void writePOINTL(Point p)
                 throws IOException
IOException

writeRECTL

public void writeRECTL(Rectangle r)
                throws IOException
IOException

writeSIZEL

public void writeSIZEL(Dimension d)
                throws IOException
IOException

writeUINT

public void writeUINT(int i)
               throws IOException
IOException

writeULONG

public void writeULONG(int i)
                throws IOException
IOException

writeLONG

public void writeLONG(int i)
               throws IOException
IOException

writeSHORT

public void writeSHORT(short i)
                throws IOException
IOException

writeBYTE

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

writeBYTE

public void writeBYTE(byte b)
               throws IOException
IOException

writeBYTE

public void writeBYTE(int b)
               throws IOException
IOException

writeBYTE

public void writeBYTE(boolean b)
               throws IOException
IOException

writeWORD

public void writeWORD(boolean b)
               throws IOException
IOException

writeDWORD

public void writeDWORD(boolean b)
                throws IOException
IOException

writeWCHAR

public void writeWCHAR(String s)
                throws IOException
IOException

writeWCHAR

public void writeWCHAR(String s,
                       int size)
                throws IOException
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
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
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
IOException

writeHeader

public void writeHeader(EMFHeader header)
                 throws IOException
IOException

getVersion

public int getVersion()

FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.