Package net.sourceforge.jtds.util
Class BlobBuffer.UnicodeInputStream
- java.lang.Object
-
- java.io.InputStream
-
- net.sourceforge.jtds.util.BlobBuffer.UnicodeInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- BlobBuffer
private class BlobBuffer.UnicodeInputStream extends java.io.InputStream
A Big Endian UnicodeInputStream
over the CLOB buffer.
-
-
Constructor Summary
Constructors Constructor Description UnicodeInputStream(long pos)
Costructs an InputStream object over the BLOB buffer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
Returns the number of bytes available to read.void
close()
Close 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.
-
-
-
Method Detail
-
finalize
protected void finalize() throws java.lang.Throwable
Ensures underlying BLOB file can be closed even if user does not close this stream.- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
available
public int available() throws java.io.IOException
Returns the number of bytes available to read.- Overrides:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
- if an I/O error occurs
-
read
public int read() throws java.io.IOException
Reads the next byte from the stream.- Specified by:
read
in classjava.io.InputStream
- Returns:
- the next byte as an
int
or -1 if at EOF - Throws:
java.io.IOException
- if an I/O error occurs
-
close
public void close() throws java.io.IOException
Close the output stream.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
- if an I/O error occurs
-
-