Class V10OutputBlob

    • Method Detail

      • open

        public void open()
                  throws java.sql.SQLException
        Description copied from interface: FbBlob
        Opens an existing input blob, or creates an output blob.
        Specified by:
        open in interface FbBlob
        Throws:
        java.sql.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 java.sql.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:
        java.sql.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.