ApacheHttpComponentを使い、multipartでPOSTするプログラムを作っております。
http://jakarta.apache.org/httpcomponents/

HttpEntityを生成するところなのですが、リクエストは投げられるもののサーバーで解析に失敗するようです。
なにかヒントはないでしょうか?
        File file = new File(imageUrl.toURI());
        String boundary = "aab03x";
        int length = (int) file.length();
        byte[] bytes = new byte[length];
        FileInputStream input = new FileInputStream(file);
        if( input.read(bytes) != length) {
            throw new IOException("Cant read:" + file);
        }
        String boundaryLine = "--" + boundary + "\r\n";
        String boundaryEnd = "\r\n--" + boundary + "--";
        StringBuilder data = new StringBuilder();
        data.append(boundaryLine);
        data.append("content-disposition: form-data; name=").append(file.getName()).append("\r\n");
        data.append("content-type: image/jpeg\r\n");
        data.append("\r\n");