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