com.ohrasys.cad.gds
Class GDSOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FileOutputStream
          extended by com.ohrasys.cad.gds.GDSOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class GDSOutputStream
extends java.io.FileOutputStream

The GDSOutputStream is used to write GDSRecords to a data source.

Since:
1.5

Constructor Summary
GDSOutputStream(java.io.File file)
          Creates a new GDSOutputStream object.
GDSOutputStream(java.io.FileDescriptor fdObj)
          Creates a new GDSOutputStream object.
GDSOutputStream(java.lang.String name)
          Creates a new GDSOutputStream object.
 
Method Summary
 java.lang.String toString()
          Returns a string representation of this class
 int writeRecord(GDSRecord record)
          Reads a GDS record from the stream.
 
Methods inherited from class java.io.FileOutputStream
close, finalize, getChannel, getFD, write, write, write
 
Methods inherited from class java.io.OutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GDSOutputStream

public GDSOutputStream(java.lang.String name)
                throws java.io.FileNotFoundException
Creates a new GDSOutputStream object.

Parameters:
name - The name of the GDS file.
Throws:
java.io.FileNotFoundException - If the file cannot be found or is not readable

GDSOutputStream

public GDSOutputStream(java.io.File file)
                throws java.io.FileNotFoundException
Creates a new GDSOutputStream object.

Parameters:
file - The GDS file
Throws:
java.io.FileNotFoundException - If the file cannot be found or is not readable

GDSOutputStream

public GDSOutputStream(java.io.FileDescriptor fdObj)
                throws java.io.FileNotFoundException
Creates a new GDSOutputStream object.

Parameters:
fdObj - The GDS file descriptor
Throws:
java.io.FileNotFoundException - If the file cannot be found or is not readable
Method Detail

toString

public java.lang.String toString()
Returns a string representation of this class

Overrides:
toString in class java.lang.Object
Returns:
The physical address of this instance

writeRecord

public int writeRecord(GDSRecord record)
                throws java.io.IOException
Reads a GDS record from the stream.

Parameters:
record - The GDSRecord to write out.
Returns:
The number of bytes written.
Throws:
java.io.IOException - If an IO error occurs.