Results 1 to 3 of 3
- 08-10-2010, 02:33 PM #1
Member
- Join Date
- Aug 2010
- Posts
- 5
- Rep Power
- 0
how to store image data recive form server??
Hi All
actually, i receive the image data in the hex format from the server
than hex data store in the String like this
String s = StringTools.toStringValue(packet,0,packetLen).trim ();
problem is-
how to store the String in the the blob filed in the database and again how to make image from hex data
pls help me ??
thanks
sandeep
- 08-10-2010, 03:32 PM #2
Just a comment about the code shown.
Are you sure you want to trim it? The characters at the end of an image are part of an image .
- 08-10-2010, 04:01 PM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Do not store it as a String.
It is binary data...it is not a String.
Turning it into a String means you'll never successfully read it back out.
Do you have an InputStream coming in from the server? If so then simply use that stream with the setBinaryStream() method on a PreparedStatement.
If you don't know what any of that means then you need to go through a tutorial.
Similar Threads
-
Using Throwable to store data in buffers and "throwing" data
By BruteforceFtw in forum New To JavaReplies: 7Last Post: 06-08-2010, 02:02 PM -
How to store data.
By djr1 in forum New To JavaReplies: 5Last Post: 02-17-2010, 07:33 AM -
want to generate a html form page with dynamic data and submit this form to a url
By vishalkrsrivastava in forum Java AppletsReplies: 10Last Post: 08-12-2009, 04:02 PM -
how to store the data in data base
By eclipse3.4ide in forum New To JavaReplies: 5Last Post: 02-03-2009, 04:25 AM -
enctype=multipart/form-data with form data in struts
By vk_satheesh in forum New To JavaReplies: 0Last Post: 09-19-2008, 12:48 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks