Converting Image to byte array ?
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?
DataOutputStream dos = conn.openDataOutputStream();</p> <p> Image ima = data.getImg();</p> <p> dos.writeUTF(data.getName());<br /> dos.writeUTF(data.getTel());<br />