title: java Files.readAllBytes(image.png) doesn't work
body: <p>I was trying to read from file and then write to other file. I use code bellow to do so.</p>
  
  <pre><code>byte[] bytes = Files.readAllBytes(file1);
  
  Writer Writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file2), "UTF-8"));
  for(int i=0;i&lt;bytes.length;i++)
       Writer.write(bytes[i]);
  Writer.close();
  </code></pre>
  
  <p>But when I change file1 to picture.png and file2 to picture2.png, this method doesn't work and I can't open picture2.png using image viewer.</p>
  
  <p>What have I done wrong?</p>