question: public static void copyStream ( InputStream inputStream , OutputStream outputStream ) { if ( inputStream != null && outputStream != null ) { try { int length = - 1 ; byte [ ] buffer = new byte [ Constant . Capacity . BYTES_PER_MB ] ; while ( ( length = inputStream . read ( buffer , 0 , buffer . length ) ) != - 1 ) { outputStream . write ( buffer , 0 , length ) ; outputStream . flush ( ) ; } } catch ( Exception e ) { throw new FileUtilException ( e ) ; } } }
target:  copy stream , from input to output,it don't close