static public void copyFileB ( File fileIn , OutputStream out , int bufferSize ) throws IOException { try ( FileInputStream fin = new FileInputStream ( fileIn ) ) { InputStream in = new BufferedInputStream ( fin ) ; IO . copyB ( in , out , bufferSize ) ; } }
copy file to output stream specify internal buffer size