title: Found 'Reliance on default encoding' in OutputStream
body: <p>How can we fix the <code>Reliance on default encoding</code> reported by findBugs:</p>
  
  <pre><code>    StringBuffer printData = getPrintData(data);
  
      try {
              OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(new File(linkName)));
              out.write(printData.toString());
              out.flush();
  
              final FileInputStream f = new FileInputStream(new File(linkName));
              return f;
          } catch (final IOException ioe) {
              ioe.printStackTrace();
          }
  </code></pre>
  
  <p>I am writing the file using <code>StreamWriter</code>.</p>