jm.jigl
Class SignalInputStream

java.lang.Object
  |
  +--jm.jigl.SignalInputStream

public class SignalInputStream
extends java.lang.Object

Class declaration

See Also:
jigl.signal.SignalInputStream

Field Summary
protected  java.io.BufferedInputStream data
           
protected  int maxval
           
protected  float maxvalf
           
protected  int ndims
          Number of dimensions the signal has
protected  int X
          Width of the signal
 
Constructor Summary
SignalInputStream(SignalInputStream stream)
          Makes a new SignalInputStream from another SignalInputStream
SignalInputStream(java.lang.String fn)
          Opens a SignalInputStream from a filename
SignalInputStream(java.lang.String url, int i)
          Opens a SignalInputStream from a filename
 
Method Summary
 void close()
          Closes the InputStream
 int ndims()
          Returns the number of Dimensions that the signal has
 Signal read()
          Reads in the Signal
 void readHeader()
          Reads the file header: determines type, size and range of values
 int readMagic()
          Gets the magic number and returns the type
 int type()
          Returns the type of signal UNKNOWN = 0 PDS_ASCII = 1 -- not Implemented PRS_ASCII = 2 -- not Implemented PDS_RAW = 3 PRS_RAW = 4
 int X()
          Returns the width of the signal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected java.io.BufferedInputStream data

ndims

protected int ndims
Number of dimensions the signal has


X

protected int X
Width of the signal


maxval

protected int maxval

maxvalf

protected float maxvalf
Constructor Detail

SignalInputStream

public SignalInputStream(java.lang.String fn)
                  throws java.io.FileNotFoundException,
                         SignalNotSupportedException,
                         java.io.IOException
Opens a SignalInputStream from a filename

Parameters:
fn - the filename to open

SignalInputStream

public SignalInputStream(java.lang.String url,
                         int i)
                  throws java.io.IOException,
                         SignalNotSupportedException,
                         java.net.MalformedURLException
Opens a SignalInputStream from a filename


SignalInputStream

public SignalInputStream(SignalInputStream stream)
Makes a new SignalInputStream from another SignalInputStream

Method Detail

ndims

public int ndims()
Returns the number of Dimensions that the signal has


X

public int X()
Returns the width of the signal


type

public int type()
Returns the type of signal
UNKNOWN = 0
PDS_ASCII = 1 -- not Implemented
PRS_ASCII = 2 -- not Implemented
PDS_RAW = 3
PRS_RAW = 4


close

public void close()
           throws java.io.IOException
Closes the InputStream

java.io.IOException

readMagic

public int readMagic()
              throws SignalNotSupportedException,
                     java.io.IOException
Gets the magic number and returns the type

SignalNotSupportedException
java.io.IOException

readHeader

public void readHeader()
                throws SignalNotSupportedException,
                       java.io.IOException
Reads the file header: determines type, size and range of values

SignalNotSupportedException
java.io.IOException

read

public Signal read()
            throws SignalNotSupportedException,
                   IllegalPBMFormatException,
                   java.io.IOException
Reads in the Signal

SignalNotSupportedException
IllegalPBMFormatException
java.io.IOException