J2ME realize some small experience of mobile phone picture uploading

Source: Internet
Author: User

These days research j2me picture file upload, mobile phone use fileconnection Browse folder, read picture file,

Then commit to the HTTP interface on the server.

The first is the httpconnection, send the data (build file Upload method is the same), found that the data are used chunked code,

There is nothing on the service side (there is a strange problem, I use this machine to do the service side, even if the chunked code, can also complete access to the data),

Chunked only occurs when the data exceeds 2016 bytes.

So the internet to collect data, found that Mingjava's colala example is to cut the data into 1700 byte size, loop upload, until the upload is completed,

(I don't know if Mingjava is going to do this intentionally, or if I have a problem with chunked coding at the time. hh)

There is also the online discussion of the http/1.1 http/1.0 problem, seems to be wrong. Because the socket data, set the http/1.1 http/1.0 results are the same.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.