public boolean readToOutputStream ( OutputStream os ) throws IOException { InputStream is = readInputStream ( ) ; if ( is == null ) return false ; if ( _buffer == null ) _buffer = new byte [ 256 ] ; try { int len ; while ( ( len = is . read ( _buffer , 0 , _buffer . length ) ) > 0 ) { os . write ( _buffer , 0 , len ) ; } return true ; } finally { is . close ( ) ; } }
Reads data to an output stream .