• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

retrieving more than one images using http connection

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear friends
asking you for help again i am implementing a j2me application which retrieves more than one images when one search string is given.but the problem is how to retreive more than one images.the request is send once...then the client shows a problem after the first response.
please tell me what shall i do to implement this
thanking you in advance
pradeep
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pradeep,
This requires some implementation logic. that is it.
you can keep some header parameters like number of images, lenght of each image in bytes etc in the http response. then send all the images one after the other in HTTP body. after reading the reasponse u can get the length of each images and put it into different byte arrays(this can be done by using System.arraycopy()). these byte arrays are the different images. u can pass this byte arrays to Image.createImage method call.

Hope this helps u

Nidheesh
 
pradeep u nair
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi nideesh
i tried out your information.now the problem is that the images are being sent from the server side encoded with base64 and being decoded on the client side. but still using the createImage() method shows an illegal argument exception. pleasse help
 
pradeep u nair
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi nideesh
i tried to do it the other way but it proved to be futile.so i used a bit more logic. now i am calling the servlet every time i require an image.thats the only way out i see.after posting this question in many a forums and searching the net for the answers.
Other case is that if it were a bluetooth application, the thing would have worked fine with OBEX protocol.
thanks for all your guys help
Pradeep
 
Uh oh, we're definitely being carded. Here, show him this tiny ad:
The new gardening playing cards kickstarter is now live!
https://www.kickstarter.com/projects/paulwheaton/garden-cards
reply
    Bookmark Topic Watch Topic
  • New Topic