Package net.sourceforge.jtds.util
Class BlobBuffer.BlobOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- net.sourceforge.jtds.util.BlobBuffer.BlobOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
- Enclosing class:
- BlobBuffer
private class BlobBuffer.BlobOutputStream extends java.io.OutputStreamImplements anOutputStreamfor BLOB data.
-
-
Constructor Summary
Constructors Constructor Description BlobOutputStream(long pos)Costructs an OutputStream object over the BLOB buffer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the output stream.protected voidfinalize()Ensures underlying BLOB file can be closed even if user does not close this stream.voidwrite(byte[] bytes, int offset, int len)Write bytes to the BLOB buffer.voidwrite(int b)Write a byte to the BLOB buffer.
-
-
-
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
-
write
public void write(int b) throws java.io.IOExceptionWrite a byte to the BLOB buffer.- Specified by:
writein classjava.io.OutputStream- Parameters:
b- the byte value to write- Throws:
java.io.IOException- if an I/O error occurs
-
write
public void write(byte[] bytes, int offset, int len) throws java.io.IOExceptionWrite bytes to the BLOB buffer.- Overrides:
writein classjava.io.OutputStream- Parameters:
bytes- the byte array value to writeoffset- the start position in the byte arraylen- the number of bytes to write- Throws:
java.io.IOException- if an I/O error occurs
-
close
public void close() throws java.io.IOExceptionClose the output stream.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream- Throws:
java.io.IOException- if an I/O error occurs
-
-