Package net.sourceforge.jtds.util
Class BlobBuffer.AsciiInputStream
- java.lang.Object
-
- java.io.InputStream
-
- net.sourceforge.jtds.util.BlobBuffer.AsciiInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- BlobBuffer
private class BlobBuffer.AsciiInputStream extends java.io.InputStreamAn ASCIIInputStreamover the CLOB buffer. This class interprets ASCII as anything which has a value below 0x80. This is more rigid than other drivers which allow any character below 0x100 to be converted to returned. The more relaxed coding is useful when dealing with most single byte character sets and if this behaviour is desired, comment out the line indicated in the read method.
-
-
Constructor Summary
Constructors Constructor Description AsciiInputStream(long pos)Costructs an InputStream object over the BLOB buffer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()Returns the number of bytes available to read.voidclose()Closes the output stream.protected voidfinalize()Ensures underlying BLOB file can be closed even if user does not close this stream.intread()Read the next byte from the stream.
-
-
-
Method Detail
-
finalize
protected void finalize() throws java.lang.ThrowableEnsures underlying BLOB file can be closed even if user does not close this stream.- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
available
public int available() throws java.io.IOExceptionReturns the number of bytes available to read.- Overrides:
availablein classjava.io.InputStream- Throws:
java.io.IOException- if an I/O error occurs
-
read
public int read() throws java.io.IOExceptionRead the next byte from the stream.- Specified by:
readin classjava.io.InputStream- Returns:
- the next byte as an
intor -1 if at EOF - Throws:
java.io.IOException- if an I/O error occurs
-
close
public void close() throws java.io.IOExceptionCloses the output stream.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException- if an I/O error occurs
-
-