Hi, 于慧娟

If you need to send a picture to a server, it depends on the case. If
you have socket connection you can just send the image as a byte
stream. Or you can use also an object data stream to transfer the
whole image object if is serializable, and it's good idea to send the
image size before that.
Bu if you really need to transfer the image as a String (I'm not
completely sure if it works at all) You can try to read the image in
byte array and create a string from it, send it to server and try to
get the byte from the read string object, but be sure that there are
no character set conversions during the process otherwise you will
loose the image.

But you need to know that even the string are send as byte array :)
You can find helpful ByteArrayInputStream and ByteArrayOutputStream

Good luck. Borko.

On Jun 17, 9:50 am, 于慧娟 <[EMAIL PROTECTED]> wrote:
> Hi ,all
>
> Can you tell me how to convert images into strings, so that it can be
> transport to the server.
>
> ----------------------------------------------------------------------------------------------
> Confidentiality Notice: The information contained in this e-mail and any 
> accompanying attachment(s) is intended only for the use of the intended 
> recipient and may be confidential and/or privileged of Neusoft Group Ltd., 
> its subsidiaries and/or its affiliates. If any reader of this communication 
> is not the intended recipient, unauthorized use, forwarding, printing, 
> storing, disclosure or copying is strictly prohibited, and may be unlawful. 
> If you have received this communication in error, please immediately notify 
> the sender by return e-mail, and delete the original message and all copies 
> from your system. Thank you.
> -----------------------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to