Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-12-2009, 12:33 AM
Member
 
Join Date: Apr 2009
Posts: 2
Rep Power: 0
afflictedd2 is on a distinguished road
Default Converting Image to byte array[] ?
Hi everyone,

I'm trying to send an image stored in midlet to a servlet through http. However to do this, the midlet has this method that retrieves an Image type. I need to convert from Image to a byte array[] or something that can be sent through a DataOutputStream, any ideas?

Code:
 DataOutputStream dos = conn.openDataOutputStream();
        
 Image ima = data.getImg();

        dos.writeUTF(data.getName());
        dos.writeUTF(data.getTel());
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display image from byte array in JPANEL waqasdaar AWT / Swing 0 03-22-2009 01:11 AM
Receive uploaded image / video (byte array) from j2me on jsp.HOW??? angelicsign JavaServer Pages (JSP) and JSTL 0 12-02-2008 04:35 PM
Converting multiple banded image into single banded image... Image enhancement archanajathan Advanced Java 0 01-08-2008 06:29 PM
Converting a byte[] into Sound savage82 Advanced Java 1 11-22-2007 12:57 AM


All times are GMT +2. The time now is 04:29 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org