org.jmol.util
Class BinaryDocument

java.lang.Object
  extended by org.jmol.util.BinaryDocument
Direct Known Subclasses:
CompoundDocument

public class BinaryDocument
extends java.lang.Object


Field Summary
protected  boolean isBigEndian
           
protected  boolean isRandom
           
protected  java.io.DataInputStream stream
           
 
Constructor Summary
BinaryDocument()
           
 
Method Summary
 void close()
           
 byte readByte()
           
 void readByteArray(byte[] b)
           
 void readByteArray(byte[] b, int off, int len)
           
 double readDouble()
           
 float readFloat()
           
 int readInt()
           
private  int readLEInt()
           
private  long readLELong()
           
 long readLong()
           
 short readShort()
           
 int readUnsignedShort()
           
 void seek(long offset)
           
 void setRandom(boolean TF)
           
 void setStream(java.io.BufferedInputStream bis, boolean isBigEndian)
           
 void setStream(java.io.DataInputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stream

protected java.io.DataInputStream stream

isRandom

protected boolean isRandom

isBigEndian

protected boolean isBigEndian
Constructor Detail

BinaryDocument

public BinaryDocument()
Method Detail

close

public void close()

setStream

public void setStream(java.io.BufferedInputStream bis,
                      boolean isBigEndian)

setStream

public void setStream(java.io.DataInputStream stream)

setRandom

public void setRandom(boolean TF)

readByte

public byte readByte()
              throws java.lang.Exception
Throws:
java.lang.Exception

readByteArray

public void readByteArray(byte[] b)
                   throws java.lang.Exception
Throws:
java.lang.Exception

readByteArray

public void readByteArray(byte[] b,
                          int off,
                          int len)
                   throws java.lang.Exception
Throws:
java.lang.Exception

readShort

public short readShort()
                throws java.lang.Exception
Throws:
java.lang.Exception

readInt

public int readInt()
            throws java.lang.Exception
Throws:
java.lang.Exception

readUnsignedShort

public int readUnsignedShort()
                      throws java.lang.Exception
Throws:
java.lang.Exception

readLong

public long readLong()
              throws java.lang.Exception
Throws:
java.lang.Exception

readFloat

public float readFloat()
                throws java.lang.Exception
Throws:
java.lang.Exception

readDouble

public double readDouble()
                  throws java.lang.Exception
Throws:
java.lang.Exception

readLEInt

private int readLEInt()
               throws java.lang.Exception
Throws:
java.lang.Exception

readLELong

private long readLELong()
                 throws java.lang.Exception
Throws:
java.lang.Exception

seek

public void seek(long offset)