Subject | Re[2]: [Firebird-Java] FBBlobField.java.patch |
---|---|
Author | Alexey Panchenko |
Post date | 2005-12-30T05:06:49Z |
Roman Rokytskyy wrote:
patch directly in the application, if getBytes() is useless for large
BLOBs.
Question about "gdsHelper.getBlobSegment(blob, bufferlength)" and FB
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 ?
If yes, than the way to go is to bypass InputStream and implement
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 ?
And one more question: is it possible for getBlobSegment() to read
data to the specified buffer ? I do not want multiple additional 16k
buffers to be allocated.
--
Best regards,
Alexey mailto:alex+news@...
> There is one issue here - there are applications that use getBytes() forYes, I can use getInputStream(), and implement the code I sent in the
> small BLOBs, changing this behavior to include one roudtrip will change its
> behavior. Also, personally I would expect that applications fetching big
> BLOBs would use getBinaryStream(), since I want to control the memory
> allocation in my application.
patch directly in the application, if getBytes() is useless for large
BLOBs.
Question about "gdsHelper.getBlobSegment(blob, bufferlength)" and FB
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 ?
If yes, than the way to go is to bypass InputStream and implement
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 ?
And one more question: is it possible for getBlobSegment() to read
data to the specified buffer ? I do not want multiple additional 16k
buffers to be allocated.
--
Best regards,
Alexey mailto:alex+news@...