JavaGDSImpl.calculateBLR(xsqlda); JavaGDSImpl.calculateIOLength(xsqlda);
AbstractJavaGDSImpl.calculateBLR(xsqlda); AbstractJavaGDSImpl.calculateIOLength(xsqlda);
    private void writeBlobRecord(GDS gds, IscDbHandle database_handle,  byte[] testBuffer) throws Exception        {        final BlobParameterBuffer blobParameterBuffer = gds.createBlobParameterBuffer();        blobParameterBuffer.addArgument(ISCConstants.isc_bpb_type, ISCConstants.isc_bpb_type_stream);        IscBlobHandle blob_handle = gds.createIscBlobHandle();        IscTrHandle transaction_handle = startTransaction(gds, database_handle);        gds.iscCreateBlob2(database_handle, transaction_handle, blob_handle, blobParameterBuffer);        if (log != null) log.info("test- new blob_id: " + blob_handle.getBlobId());        final byte[][] segments = segmentData(testBuffer);        for (int i = 0; i < segments.length; i++)            {            gds.iscPutSegment(blob_handle, segments[i]);            if (log != null) log.info("test- wrote bytes: " + (i * testBuffer.length));            }        XSQLDA xsqlda = new org.firebirdsql.gds.XSQLDA(2);        XSQLVAR xsqlvar = new org.firebirdsql.gds.XSQLVAR();        xsqlvar.sqldata = xsqlvar.encodeShort((short) 3);        xsqlvar.sqltype = ISCConstants.SQL_SHORT;        xsqlvar.sqllen = 2;        xsqlda.sqlvar[0] = xsqlvar;        xsqlvar = new org.firebirdsql.gds.XSQLVAR();        xsqlvar.sqltype = ISCConstants.SQL_BLOB;        xsqlvar.sqllen = 8;        xsqlvar.sqldata = xsqlvar.encodeLong(blob_handle.getBlobId());        xsqlda.sqlvar[1] = xsqlvar;        JavaGDSImpl.calculateBLR(xsqlda);        JavaGDSImpl.calculateIOLength(xsqlda);        gds.iscCloseBlob(blob_handle);        gds.iscDsqlExecImmed2(database_handle, transaction_handle, "INSERT INTO R2 VALUES (?, ?)",                ISCConstants.SQL_DIALECT_CURRENT, xsqlda, null);        commit(gds, transaction_handle);        }