title: Get filename from an inputstream (Java)
body: <p>if I have this code, how could I keep the filename of the original file or reassign it to the new one?:</p>
  
  <pre><code>    InputStream input= assetInfo.openStream();
      File t = new File("");
  
      OutputStream out = new FileOutputStream(t);
  
      int read=0;
      byte[] bytes = new byte[1024];
  
      while((read = input.read(bytes))!= -1){
          out.write(bytes, 0, read);
      }
  </code></pre>