http://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.0.x/httpclient/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java
You can check the key of "Image", get the input stream, do it reverse according to the sending progress. Maybe I misunderstand your question, hehe. On Mon, Aug 2, 2010 at 6:42 AM, KG <kevinconca...@gmail.com> wrote: > Hi, > > I'm trying to integrate Google App Engine with an Android app I've > built but am having trouble with image processing. In the Android > app, I convert the image into a byte array and send it to App Engine > via HTTP POST to be put in a Blob. However, even after searching > through all the examples posted, I can't figure out how to retrieve > the image and display it from the Blob (or if I even sent it to the > Blob correctly). > > Help on either the Android or Google App Engine side would be greatly > appreciated. Here's the code I'm using for the Android side: > > // Create a new HttpClient and Post Header > HttpClient httpclient = new DefaultHttpClient(); > HttpPost httppost = new HttpPost(website_url); > > ByteArrayOutputStream baos = new > ByteArrayOutputStream(); > query.compress(Bitmap.CompressFormat.PNG, 100, baos); //bm > is the bitmap object > byte[] b = baos.toByteArray(); > > try { > // Add your data > List<NameValuePair> nameValuePairs = new > ArrayList<NameValuePair>(2); > nameValuePairs.add(new BasicNameValuePair("description", > "testtesttest")); > nameValuePairs.add(new BasicNameValuePair("image", new > String(b))); > httppost.setEntity(new > UrlEncodedFormEntity(nameValuePairs)); > // Execute HTTP Post Request > HttpResponse response = httpclient.execute(httppost); > > } catch (ClientProtocolException e) { > // TODO Auto-generated catch block > } catch (IOException e) { > // TODO Auto-generated catch block > } > > 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 android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en