db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2444) Implement not implemented methods Blob.getBinaryStream(long pos, long length) and Clob. getCharacterStream(long pos, long length) in the Network Client
Date Sun, 25 Mar 2007 08:59:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483916
] 

Knut Anders Hatlen commented on DERBY-2444:
-------------------------------------------

The patch looks good. Some minor comments/questions:
  1) Blob.getBinaryStream(long,long) creates a copy of the internal byte array and wraps it
in a ByteArrayInputStream. Would it be better to use the ByteArrayInputStream constructor
which takes three arguments (array, offset and length) and pass in a direct reference to binaryString_?
This could reduce the memory footprint (except in the case where the Blob could be garbage
collected before the stream). To achieve the same thing for Clob.getCharacterStream(), I think
we would have to implement something like the LimitReader class in the engine code, but that's
not required for this issue. Just throwing out some thoughts...
  2) Blob.getBinaryStream and Clob.getCharacterStream have almost identical code for checking
position and length. Would it be possible to move that code into a common method in the base
class (Lob)?
  3) The test code uses five blanks for indentation (should be four).
  4) The javadoc comments for getCharacterStream and getBinaryStream exceed 80 characters
per line (as do a couple of lines in the methods' bodies).

> Implement not implemented methods Blob.getBinaryStream(long pos, long length) and Clob.
getCharacterStream(long pos, long length) in the Network Client
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2444
>                 URL: https://issues.apache.org/jira/browse/DERBY-2444
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>            Reporter: V.Narayanan
>         Assigned To: V.Narayanan
>         Attachments: ClobBlobNotImplemented_v1.diff, ClobBlobNotImplemented_v1.stat
>
>
> The following methods were introduced in the java.sql.Clob and java.sql.Blob interface
as part of JDBC 4.0 and need to be implemented.
> Clob
> ------
> getCharacterStream(long pos, long length)
> Blob
> ------
> getBinaryStream(long pos, long length)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message