Forums Register Login

Blob to ZIP

+Pie Number of slices to send: Send
Hi all,

I have blob data in database which is actually containing a zip file . Now i want to retrieve the blob data from DB and convert it into a zip file .
I am using postgres 8.4 data base .
By doing it normally i am not able to get to see the contents that exists in the file.
Need some suggestion
+Pie Number of slices to send: Send
What is "normally"? What, exactly, is your code doing?
+Pie Number of slices to send: Send
+Pie Number of slices to send: Send
So what is this code doing, and how does that differ from what you were expecting?

I notice that you're ignoring the return value of the is.read method call - you can't do that: https://coderanch.com/how-to/java/ReadDoesntDoWhatYouThinkItDoes
1
+Pie Number of slices to send: Send
And you should check for >= 0, not > 0. 0 is a valid return value that indicates no data is available at this moment, but there could be later on. (I've also edited that FAQ page since it also had > 0.)
+Pie Number of slices to send: Send
 

Rob Spoor wrote:And you should check for >= 0, not > 0. 0 is a valid return value that indicates no data is available at this moment, but there could be later on. (I've also edited that FAQ page since it also had > 0.)

Thank you Rob and everyone for resolving the issue .It worked
+Pie Number of slices to send: Send
You're welcome.
Yes, my master! Here is the tiny ad you asked for:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2511 times.
Similar Threads
Parsing BLOB datatype
How to upload a byte array into BLOB column?
inserting data in to blob...
Need help in reading a file stored as a blob in database
Unzip
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:52:53.