title: java SE. How to send post request with binary file?
body: <p>I am working on a java app, to upload images on yfrog.com.
  I can post on the API page successfully <strong>but without binary files just with a string parameters</strong>.
  Also the method I use <em>only accept "String"</em>.</p>
  
  <pre><code>URLConnection conn = url.openConnection();
  conn.setDoOutput(true);
  OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
  wr.write(data);
  wr.flush();
  </code></pre>
  
  <p><code>wr.write(data);</code> accept String only.</p>
  
  <p>I tried to put the image path but it doesn't work.</p>