title: Writing decoded base64 byte array as image file
body: <pre><code>    String base64Code = dataInputStream.readUTF();
  
      byte[] decodedString = null;
  
      decodedString = Base64.decodeBase64(base64Code);
  
  
      FileOutputStream imageOutFile = new FileOutputStream(
      "E:/water-drop-after-convert.jpg");
      imageOutFile.write(decodedString);
  
      imageOutFile.close(); 
  </code></pre>
  
  <p>The problem is the data is transferred completely and if the data is in text format it is displayed correctly however when i am trying to decode image and write it on output file,it doesnt simply show up in photo viewer.</p>
  
  <p>Any help would be highly appreciated</p>