public final class FBBlobOutputStream extends java.io.OutputStream implements FirebirdBlob.BlobOutputStream
OutputStream for writing Firebird blobs.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this stream.
|
void |
flush() |
FirebirdBlob |
getBlob()
Get instance of
FirebirdBlob to which this stream belongs to. |
long |
length()
Get Blob length.
|
void |
write(byte[] b,
int off,
int len)
Write data from the buffer into this stream.
|
void |
write(int b)
Write single byte into the stream.
|
public FirebirdBlob getBlob()
FirebirdBlob.BlobOutputStreamFirebirdBlob to which this stream belongs to.
Note, code
FirebirdBlob.BlobOutputStream otherStream = (FirebirdBlob.BlobOutputStream)
inputStream.getBlob().setBinaryStream(1);
will return new stream object.getBlob in interface FirebirdBlob.BlobOutputStreamFirebirdBlob.public long length()
throws java.io.IOException
FirebirdBlob.BlobOutputStreamlength in interface FirebirdBlob.BlobOutputStreamjava.io.IOException - if I/O error occurs.public void write(int b)
throws java.io.IOException
Writes are buffered up to the buffer length of the blob (optionally specified by the connection
property blobBufferSize).
write in interface FirebirdBlob.BlobOutputStreamwrite in class java.io.OutputStreamb - data to write, only lowest 8 bits are written.java.io.IOException - if I/O error occurs.public void write(byte[] b,
int off,
int len)
throws java.io.IOException
Writes are buffered up to the buffer length of the blob (optionally specified by the connection
property blobBufferSize).
write in interface FirebirdBlob.BlobOutputStreamwrite in class java.io.OutputStreamb - buffer from which data should be written.off - offset in the buffer.len - number of bytes to write.java.io.IOException - if I/O error occurs.public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
FirebirdBlob.BlobOutputStreamclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface FirebirdBlob.BlobOutputStreamclose in class java.io.OutputStreamjava.io.IOException - if I/O error occurs.Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.