title: Writing the byte array to sub folder in java
body: <p>Currently I am making one folder with help of File class</p>
  
  <pre><code>String homeDir = System.getProperty("user.home"); // this will  return C:\Users\username
  
  byte[] b1 = abc.getValue(); // contains byte value
  
  String dependentFile = "logoImageData"; // this is the folder name 
  
  File f = new File(homeDir+"/"+ dependentFile); // after this line folder will be created like C:\Users\username\logoImageData
  
  FileOutputStream fout=new FileOutputStream(homeDir+"/"+  abc.getName()); // assume abc.getName is image.jpg
  
  fout.write(b1);  // this is writing the byte array data into location C:\Users\username\image.jpg
  fout.close();
  </code></pre>
  
  <p>But I want the location to be C:\Users\username\logoImageData\image.jpg</p>
  
  <p>Can please anyone point out what needs to be done to change the FileOutputStream location.
  I tried and searched but unable to find out the exact thing.</p>
  
  <p>I tried my best to detailed my problem. If still not clear then let me know I will try in another way.</p>