public byte [ ] readRegion ( int off , int len ) { this . buffer . rewind ( ) ; if ( off < 0 || len <= 0 || off + len > this . buffer . limit ( ) ) { return null ; } byte [ ] region = new byte [ len ] ; this . buffer . get ( region , off , len ) ; return region ; }
Read a byte region from specified offset with specified length