private class BlobBuffer.BlobInputStream
extends java.io.InputStream
InputStream
over the BLOB buffer.Modifier and Type | Field and Description |
---|---|
private boolean |
open |
private int |
readPtr |
Constructor and Description |
---|
BlobBuffer.BlobInputStream(long pos)
Costructs an
InputStream object over the BLOB buffer. |
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes available to read.
|
void |
close()
Closes the output stream.
|
protected void |
finalize()
Ensures underlying BLOB file can be closed even if user does not
close this stream.
|
int |
read()
Reads the next byte from the stream.
|
int |
read(byte[] bytes,
int offset,
int len)
Reads a bytes from the stream.
|
public BlobBuffer.BlobInputStream(long pos) throws java.io.IOException
InputStream
object over the BLOB buffer.pos
- the starting position (from 0)java.io.IOException
- if an I/O error occursprotected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
- if an I/O error occurspublic int read() throws java.io.IOException
read
in class java.io.InputStream
int
or -1 if at EOFjava.io.IOException
- if an I/O error occurspublic int read(byte[] bytes, int offset, int len) throws java.io.IOException
read
in class java.io.InputStream
bytes
- the byte array to filloffset
- the start position in the byte arraylen
- the number of bytes to readjava.io.IOException
- if an I/O error occurspublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
- if an I/O error occursGenerated on June 8 2013