You can find the basic example for a "chunk encoded POST" on the Apache HttpClient example page.
For the form-based post you also need org.apache.httpcomponents:httpmime:4.3.2
With that you get the org.apache.http.entity.mime.MultipartEntityBuilder
which you can use like so:
MultipartEntityBuilder meb = MultipartEntityBuilder.create();
meb.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
meb.addPart("to", new StringBody("The recipient", ContentType.TEXT_PLAIN));
meb.addPart("from", new StringBody("The sender", ContentType.TEXT_PLAIN));
FileBody fb = new FileBody(new File("path/to/your/file"), ContentType.create("image/jpeg"));
meb.addPart("file", fb);
meb.addPart("footer", new StringBody("The footer", ContentType.TEXT_PLAIN));
httppost.setEntity(meb.build());
That should help you on your way.