Object syncObject = ((FBBlob)getBlob()).getSynchronizationObject();
Object syncObject = ((Synchronizable)getBlob()).getSynchronizationObject();
    public byte[] getBytesInternal() throws SQLException {        final byte[] blobIdBuffer = getFieldData();                if (blobIdBuffer == null)             return BYTES_NULL_VALUE;                final long blobId = field.decodeLong(blobIdBuffer);                Object syncObject = ((FBBlob)getBlob()).getSynchronizationObject();        synchronized (syncObject) {            try {                final IscBlobHandle blobHandle =                     gdsHelper.openBlob(blobId, FBBlob.SEGMENTED);                                try {                    final GDS gds = gdsHelper.getInternalAPIHandler();                                        final byte[] lengthBuffer =                         gds.iscBlobInfo(blobHandle, FBBlob.BLOB_LENGTH_REQUEST, 20);                                        final int blobLength = (int)FBBlob.interpretLength(gds,lengthBuffer, 0);                                        final int bufferLength = gdsHelper.getBlobBufferLength();                    final byte[] resultBuffer = new byte[blobLength];                                        int offset = 0;                                        while (offset < blobLength) {                        final byte[] segementBuffer =                             gdsHelper.getBlobSegment(blobHandle, bufferLength);                                                if (segementBuffer.length == 0) {                            // unexpected EOF                            throw (SQLException) createException(BYTES_CONVERSION_ERROR);                        }                                                System.arraycopy(segementBuffer, 0, resultBuffer, offset, segementBuffer.length);                                                offset += segementBuffer.length;                    }                                        return resultBuffer;                                    } finally {                    gdsHelper.closeBlob(blobHandle);                }                            } catch (GDSException e) {                throw new FBSQLException(e);            }        }    }