question: public void copyStream ( InputStream is ) throws IOException { super . setContentEncoding ( null ) ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; while ( true ) { int b = is . read ( ) ; if ( b == - 1 ) { content = baos . toByteArray ( ) ; is . close ( ) ; return ; } } }
target:  Set the content by copying the given stream. <p> Note: Do NOT use this when the content is character data since the encoding attribute will NOT be set.