question: public static byte [ ] readAll ( InputStream inStr ) throws IOException { ByteArrayOutputStream buf = new ByteArrayOutputStream ( ) ; pipeAll ( inStr , buf ) ; return buf . toByteArray ( ) ; }
target:  Read stream fully, returning contents in a byte array.