use of org.firebirdsql.jdbc.FBBlob in project jaybird by FirebirdSQL.
the class FBBlobField method copyBinaryStream.
private void copyBinaryStream(InputStream in, long length) throws SQLException {
FBBlob blob = new FBBlob(gdsHelper);
blob.copyStream(in, length);
setFieldData(getDatatypeCoder().encodeLong(blob.getBlobId()));
blobExplicitNull = false;
}
use of org.firebirdsql.jdbc.FBBlob in project jaybird by FirebirdSQL.
the class FBBlobField method setClob.
@Override
public void setClob(FBClob clob) throws SQLException {
FBBlob blob = clob.getWrappedBlob();
setBlob(blob);
}
use of org.firebirdsql.jdbc.FBBlob in project jaybird by FirebirdSQL.
the class FBLongVarCharField method copyBytes.
private void copyBytes(byte[] bytes, int length) throws SQLException {
FBBlob blob = new FBBlob(gdsHelper);
blob.copyBytes(bytes, 0, length);
setFieldData(getDatatypeCoder().encodeLong(blob.getBlobId()));
blobExplicitNull = false;
}
use of org.firebirdsql.jdbc.FBBlob in project jaybird by FirebirdSQL.
the class FBBlobField method getBlob.
@Override
public Blob getBlob() throws SQLException {
if (blob != null)
return blob;
final byte[] bytes = getFieldData();
if (bytes == null)
return null;
/*@todo convert this into a method of FirebirdConnection */
blob = new FBBlob(gdsHelper, getDatatypeCoder().decodeLong(bytes));
return blob;
}
use of org.firebirdsql.jdbc.FBBlob in project jaybird by FirebirdSQL.
the class FBBlobField method copyCharacterStream.
private void copyCharacterStream(Reader in, long length, Encoding encoding) throws SQLException {
FBBlob blob = new FBBlob(gdsHelper);
blob.copyCharacterStream(in, length, encoding);
setFieldData(getDatatypeCoder().encodeLong(blob.getBlobId()));
blobExplicitNull = false;
}