public class PDBStream extends Stream
Modifier and Type | Field and Description |
---|---|
protected PDBFile |
pdb |
protected int |
recSize |
skipBuffer
Constructor and Description |
---|
PDBStream(java.lang.String name)
Constructs a new PDBStream opening a PDB with the given name in READ_WRITE mode.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying PDBFile.
|
int |
readBytes(byte[] buf,
int start,
int count)
Reads bytes from the stream.
|
int |
writeBytes(byte[] buf,
int start,
int count)
Always throws IOException; not implemented.
|
asInputStream, asOutputStream, asStream, asStream, skipBytes, wrapInputStream, wrapInputStreamToStream, write, writeBytes, writeBytes, writeBytes
protected int recSize
protected PDBFile pdb
public PDBStream(java.lang.String name) throws IllegalArgumentIOException, FileNotFoundException, IOException
name
- The pdb name of the file to open in the format Name.CRTR.TYPE.IllegalArgumentIOException
FileNotFoundException
IOException
public int writeBytes(byte[] buf, int start, int count) throws IOException
writeBytes
in class Stream
buf
- the byte array to write data fromstart
- the start position in the byte arraycount
- the number of bytes to writeIOException
public void close() throws IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
IOException
- If an I/O error occurs.public int readBytes(byte[] buf, int start, int count) throws IOException
Stream
readBytes
in class Stream
buf
- the byte array to read data intostart
- the start position in the arraycount
- the number of bytes to readIOException