Results 1 to 3 of 3
  1. #1
    sandeep23k is offline Member
    Join Date
    Aug 2010
    Rep Power

    Default 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 ??


  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    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 .

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power


    Do not store it as a String.
    It is binary 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

  1. Using Throwable to store data in buffers and "throwing" data
    By BruteforceFtw in forum New To Java
    Replies: 7
    Last Post: 06-08-2010, 02:02 PM
  2. How to store data.
    By djr1 in forum New To Java
    Replies: 5
    Last Post: 02-17-2010, 07:33 AM
  3. Replies: 10
    Last Post: 08-12-2009, 04:02 PM
  4. how to store the data in data base
    By eclipse3.4ide in forum New To Java
    Replies: 5
    Last Post: 02-03-2009, 04:25 AM
  5. enctype=multipart/form-data with form data in struts
    By vk_satheesh in forum New To Java
    Replies: 0
    Last Post: 09-19-2008, 12:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts