Class V10OutputBlob

All Implemented Interfaces:
AutoCloseable, FbBlob, DatabaseListener, ExceptionListenable, TransactionListener, FbWireBlob

public class V10OutputBlob extends AbstractFbWireOutputBlob implements FbWireBlob, DatabaseListener
Since:
3.0
Author:
Mark Rotteveel
  • Constructor Details

  • Method Details

    • open

      public void open() throws SQLException
      Description copied from interface: FbBlob
      Opens an existing input blob, or creates an output blob.
      Specified by:
      open in interface FbBlob
      Throws:
      SQLException - If the blob is already open, this is a (closed) output blob and it already has a blobId, the transaction is not active, or a database connection error occurred
    • putSegment

      public void putSegment(byte[] segment) throws SQLException
      Description copied from interface: FbBlob
      Writes a segment of blob data.

      Implementation must handle segment length exceeding FbBlob.getMaximumSegmentSize() by batching. TODO: reconsider and let caller handle that?

      Passing a section that is length 0 will throw an SQLException.

      Specified by:
      putSegment in interface FbBlob
      Parameters:
      segment - Segment to write
      Throws:
      SQLException - If this is an input blob, the blob is closed, the transaction is not active, the segment is length 0 or longer than the maximum segment size, or a database connection error occurred.