public synchronized int read ( byte [ ] b , int off , int len ) throws IOException { // parameter check if ( ( off | len | ( off + len ) | ( b . length - ( off + len ) ) ) < 0 ) { throw new IndexOutOfBoundsException ( ) ; } int n = 0 ; for ( ; ; ) { int nread = read1 ( b , off + n , len - n ) ; if ( nread <= 0 ) return ( n == 0 ) ? nread : n ; n += nread ; if ( n >= len ) return n ; } }
Read checksum verified bytes from this byte - input stream into the specified byte array starting at the given offset .