org.firebirdsql.jdbc
Class FBBlobOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.firebirdsql.jdbc.FBBlobOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, FirebirdBlob.BlobOutputStream

public class FBBlobOutputStream
extends java.io.OutputStream
implements FirebirdBlob.BlobOutputStream


Method Summary
 void close()
          Close this stream.
 long length()
          Get Blob length.
 void seek(int position, int seekMode)
           
 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.
 void writeSegment(byte[] buf)
           
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

seek

public void seek(int position,
                 int seekMode)
          throws java.sql.SQLException
Throws:
java.sql.SQLException

length

public long length()
            throws java.io.IOException
Description copied from interface: FirebirdBlob.BlobOutputStream
Get Blob length. This method is the only available way to obtain length of a Blob that is in temporary state,

Specified by:
length in interface FirebirdBlob.BlobOutputStream
Returns:
length of the blob.
Throws:
java.io.IOException - if I/O error occurs.

write

public void write(int b)
           throws java.io.IOException
Description copied from interface: FirebirdBlob.BlobOutputStream
Write single byte into the stream.

Specified by:
write in interface FirebirdBlob.BlobOutputStream
Specified by:
write in class java.io.OutputStream
Parameters:
b - data to write, only lowest 8 bits are written.
Throws:
java.io.IOException - if I/O error occurs.

writeSegment

public void writeSegment(byte[] buf)
                  throws GDSException
Throws:
GDSException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Description copied from interface: FirebirdBlob.BlobOutputStream
Write data from the buffer into this stream.

Specified by:
write in interface FirebirdBlob.BlobOutputStream
Overrides:
write in class java.io.OutputStream
Parameters:
b - buffer from which data should be written.
off - offset in the buffer.
len - number of bytes to write.
Throws:
java.io.IOException - if I/O error occurs.

close

public void close()
           throws java.io.IOException
Description copied from interface: FirebirdBlob.BlobOutputStream
Close this stream. Calling this method closes Blob stream and moves Blob from temporary into permanent state making any further content updates impossible.

Specified by:
close in interface java.io.Closeable
Specified by:
close in interface FirebirdBlob.BlobOutputStream
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException - if I/O error occurs.


Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.