com.ohrasys.cad.gds
Class GDSInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FileInputStream
          extended by com.ohrasys.cad.gds.GDSInputStream
All Implemented Interfaces:
java.io.Closeable

public class GDSInputStream
extends java.io.FileInputStream

The GDSInputStream is used to read GDSRecord from a data source.

Since:
1.5

Constructor Summary
GDSInputStream(java.io.File file)
          Creates a new GDSInputStream object.
GDSInputStream(java.io.FileDescriptor fdObj)
          Creates a new GDSInputStream object.
GDSInputStream(java.lang.String name)
          Creates a new GDSInputStream object.
 
Method Summary
 GDSRecord readRecord()
          Reads a GDS record from the stream.
 java.lang.String toString()
          Returns a string representation of this class
 
Methods inherited from class java.io.FileInputStream
available, close, finalize, getChannel, getFD, read, read, read, skip
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GDSInputStream

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

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

GDSInputStream

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

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

GDSInputStream

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

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

readRecord

public GDSRecord readRecord()
                     throws GDSRecordException
Reads a GDS record from the stream.

Returns:
A GDSRecord from the stream.
Throws:
GDSRecordException - If an invalid record is read.

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