Package net.sourceforge.jtds.util
Class BlobBuffer.BlobOutputStream
java.lang.Object
java.io.OutputStream
net.sourceforge.jtds.util.BlobBuffer.BlobOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Enclosing class:
BlobBuffer
Implements an
OutputStream for BLOB data.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlobOutputStream(long pos) Costructs an OutputStream object over the BLOB buffer. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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.Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
Field Details
-
writePtr
private int writePtr -
open
private boolean open
-
-
Constructor Details
-
BlobOutputStream
BlobOutputStream(long pos) throws IOException Costructs an OutputStream 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. -
write
Write a byte to the BLOB buffer.- Specified by:
writein classOutputStream- Parameters:
b- the byte value to write- Throws:
IOException- if an I/O error occurs
-
write
Write bytes to the BLOB buffer.- Overrides:
writein classOutputStream- Parameters:
bytes- the byte array value to writeoffset- the start position in the byte arraylen- the number of bytes to write- Throws:
IOException- if an I/O error occurs
-
close
Close the output stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException- if an I/O error occurs
-