question: public static byte [ ] readAllLimited ( InputStream inStr , int limit ) throws IOException { ByteArrayOutputStream buf = new ByteArrayOutputStream ( ) ; pipeAllLimited ( inStr , limit , buf ) ; return buf . toByteArray ( ) ; }
target:  Read from inStr up to a maximum number of bytes, throwing an exception if more the maximum amount of requested data is available.