public byte [ ] toByteArray ( ) { try { ByteArrayOutputStream bout = new ByteArrayOutputStream ( size ( ) ) ; pipe ( bout ) ; return bout . toByteArray ( ) ; } catch ( IOException ioe ) { throw new RuntimeException ( "should be impossible" , ioe ) ; } }
Gets a copy of the buffered bytes .