title: How to convert string into formfile
body: <p>Is there any way to convert a <code>string</code> into <code>formfile</code> in <code>Java</code>?</p>
  
  <p>I am stuck here:</p>
  
  <pre><code>fos.write(file.getFileData());
  </code></pre>
  
  <p>Instead of a <code>file</code> I am having a <code>string</code> and I cannot use <code>getFileData()</code> for a <code>string</code>.</p>
  
  <p>Can anyone help me?</p>