Subject | Re: [Firebird-Java] FBBlobField.java.patch |
---|---|
Author | Roman Rokytskyy |
Post date | 2005-12-30T16:24:27Z |
> Question about "gdsHelper.getBlobSegment(blob, bufferlength)" and FBNo, the fetched length must be 0.
> API - if is returns buffer smaller than the requested length does that
> mean that there is no more data ?
> Are Firebird BLOBs still segemented or they are streamed now ?They are of the type they were created. If created from Java application
they are segmented by default, you can create stream BLOBs by specifying
corresponding property (useStreamBlobs).
> If yes, than the way to go is to bypass InputStream and implementWhat for? You can use ResultSet.getBlob() method and use Blob.read()
> getBytes() directly through these calls. If returned buffer is smaller
> than the requested size - it is small BLOB and returned buffer should
> be returned to the user directly, else request BLOB length, allocate
> the whole BLOB buffer and read it all.
>
> Is this possible ?
methods - you have no overhead compared to current implementation of the
AbstractJavaGDSImpl.iscGetSegment(...) method regarding memory allocation
and this is still plain JDBC. Method will return you data from the internal
buffer without blocking. Otherwise use FirebirdBlob.readFully(...).
> And one more question: is it possible for getBlobSegment() to readNot yet, but we can add this feature in next point release.
> data to the specified buffer ? I do not want multiple additional 16k
> buffers to be allocated.
Roman