×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    37

    How to Get Image Binary Data in XML

    Hi Folks,

    I want to store image in RMS. Instead of converting in bytearray
    on mobile device i want that web server itself send me a binary data in XML (<IMG> Binary Data </IMG>) . How can we do this pls
    tell.


    Thanx
    wating for reply.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Forget XML. Just download the image directly from the server. Store the image somewhere on your webserver, make an HttpConnection in the MIDlet that connects to the url of the image (ie, conn = (HtppConnection)Connector.open("http://myserver.com/somepath/theimage.png")). The data you read from this connection into a byte array is the binary data of the image. You can use this byte array to store it in the RMS or as an argument to createImage() for displaying the image in the mobile.

    shmoove

Posting Permissions

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