public void inputStreamToFile ( InputStream is , String filename ) throws IOException { FileOutputStream fos = new FileOutputStream ( filename ) ; inputStreamToOutputStream ( is , fos ) ; fos . close ( ) ; }
Write to a file the bytes read from an input stream .