Oracle Database BLOB to InputStream in Java?

Declare your Java parameter of type oracle.sql. BLOB as per the Mapping Datatypes" documentation Then, you call getBinaryStream() on that BLOB object to obtain your InputStream.

Declare your Java parameter of type oracle.sql. BLOB as per the "Mapping Datatypes" documentation. Then, you call getBinaryStream() on that BLOB object to obtain your InputStream.

– Data-Base Nov 8 at 14:03 @Data-Base: I edited the answer. – Adam Paynter Nov 8 at 14:14 oracle.sql. BLOB gives me an error!

– Data-Base Nov 9 at 9:23 @Data-Base: Please tell us what error. – Adam Paynter Nov 9 at 9:33 no problem it works just fine, Thanks allot :-) – Data-Base Nov 9 at 13:32.

You haven't really said how you're fetching data from the database, but you can use ResultSet.getBinaryStream() to get an InputStream, or call getBlob() to get a Blob, and then getBinaryStream() on the Blob to get a stream.

We fatch it with PL/SQL so nothing special here, where there is a PL/SQL function that call the java function and return the results – Data-Base Nov 8 at 12:32 @Data-Base: I meant which client technology you were using - an ORM such as direct JDBC, which driver etc. – Jon Skeet Nov 8 at 12:33 not sure what do you mean but none! We just query the database from the PL/SQL and send the variable to the function the function take the variable convert the data and return a text the Java is compiled as class inside the Oracle Database – Data-Base Nov 8 at 12:42 2 @Data-Base: Ah - that's a different matter then.It's relatively rare to come across Java code running in the database... I wish you'd said that to start with, as I've no idea how that works. Basically look for Blob-related calls in whatever API you've got... – Jon Skeet Nov 8 at 12:45.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions