Package net.sourceforge.jtds.util
Class BlobBuffer.UnicodeInputStream
java.lang.Object
java.io.InputStream
net.sourceforge.jtds.util.BlobBuffer.UnicodeInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
- BlobBuffer
A Big Endian Unicode
InputStream
over the CLOB buffer.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUnicodeInputStream
(long pos) Costructs an InputStream object over the BLOB buffer. -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
readPtr
private int readPtr -
open
private boolean open
-
-
Constructor Details
-
UnicodeInputStream
Costructs an InputStream object over the BLOB buffer.- Parameters:
pos
- the starting position (from 0)- Throws:
IOException
- if an I/O error occurs
-
-
Method Details
-
finalize
Ensures underlying BLOB file can be closed even if user does not close this stream. -
available
Returns the number of bytes available to read.- Overrides:
available
in classInputStream
- Throws:
IOException
- if an I/O error occurs
-
read
Reads the next byte from the stream.- Specified by:
read
in classInputStream
- Returns:
- the next byte as an
int
or -1 if at EOF - Throws:
IOException
- if an I/O error occurs
-
close
Close the output stream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
- if an I/O error occurs
-