This seems like a very bad impl - at least for JDBC.
Why are the details of this access not hidden in the JDBC driver? The
column type is the only thing that a user should be concerned with.
Why would someone want to code proprietary Postgres code just to
access BLOBs?
The JDBC blob API is very good. Using either the BLOB/locator
interface or the getInputStream();
Oracle used to do a similar thing, and finally got with the program
and uses strict JDBC in their latest driver releases.