@ Deprecated // replace with StreamUtil.copyContentIntoOutputStream() private static void copyStream ( InputStream input , OutputStream output ) throws IOException { byte [ ] buffer = new byte [ BUFFER_SIZE ] ; int len ; while ( ( len = input . read ( buffer ) ) != - 1 ) { output . write ( buffer , 0 , len ) ; } }
Copy stream .