@ SuppressWarnings ( "PMD.AssignmentInOperand" ) private String text ( final T item ) throws IOException { final String text ; try ( InputStream input = this . itemBody ( item ) ; ByteArrayOutputStream output = new ByteArrayOutputStream ( ) ) { // @checkstyle MagicNumberCheck (1 line) final byte [ ] buffer = new byte [ 1024 ] ; int len ; while ( ( len = input . read ( buffer , 0 , buffer . length ) ) != - 1 ) { output . write ( buffer , 0 , len ) ; } output . flush ( ) ; text = new String ( output . toByteArray ( ) , this . charset ) ; } return text ; }
Text from item .