org.jmol.util
Class BinaryDocument
java.lang.Object
org.jmol.util.BinaryDocument
- Direct Known Subclasses:
- CompoundDocument
public class BinaryDocument
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stream
protected DataInputStream stream
isRandom
protected boolean isRandom
isBigEndian
protected boolean isBigEndian
nBytes
long nBytes
os
OutputStream os
BinaryDocument
public BinaryDocument()
close
public void close()
setStream
public void setStream(BufferedInputStream bis,
boolean isBigEndian)
setIsBigEndian
public void setIsBigEndian(boolean TF)
setStream
public void setStream(DataInputStream stream)
setRandom
public void setRandom(boolean TF)
readByte
public byte readByte()
throws Exception
- Throws:
Exception
ioReadByte
private byte ioReadByte()
throws Exception
- Throws:
Exception
readByteArray
public void readByteArray(byte[] b)
throws Exception
- Throws:
Exception
readByteArray
public int readByteArray(byte[] b,
int off,
int len)
throws Exception
- Throws:
Exception
ioRead
private int ioRead(byte[] b,
int off,
int len)
throws Exception
- Throws:
Exception
readString
public String readString(int nChar)
throws Exception
- Throws:
Exception
readShort
public short readShort()
throws Exception
- Throws:
Exception
ioReadShort
private short ioReadShort()
throws Exception
- Throws:
Exception
readInt
public int readInt()
throws Exception
- Throws:
Exception
ioReadInt
private int ioReadInt()
throws Exception
- Throws:
Exception
writeInt
private void writeInt(int i)
throws Exception
- Throws:
Exception
swapBytes
public static int swapBytes(int n)
swapBytes
public static short swapBytes(short n)
readUnsignedShort
public int readUnsignedShort()
throws Exception
- Throws:
Exception
readLong
public long readLong()
throws Exception
- Throws:
Exception
ioReadLong
private long ioReadLong()
throws Exception
- Throws:
Exception
writeLong
private void writeLong(long b)
throws Exception
- Throws:
Exception
readFloat
public float readFloat()
throws Exception
- Throws:
Exception
ioReadFloat
private float ioReadFloat()
throws Exception
- Throws:
Exception
readDouble
public double readDouble()
throws Exception
- Throws:
Exception
ioReadDouble
private double ioReadDouble()
throws Exception
- Throws:
Exception
readLEInt
private int readLEInt()
throws Exception
- Throws:
Exception
readLELong
private long readLELong()
throws Exception
- Throws:
Exception
seek
public void seek(long offset)
getPosition
public long getPosition()
setOutputStream
public void setOutputStream(OutputStream os)