public int readN ( final byte [ ] abuf , final int off , final int len ) throws OtpErlangDecodeException { if ( len == 0 && available ( ) == 0 ) { return 0 ; } final int i = super . read ( abuf , off , len ) ; if ( i < 0 ) { throw new OtpErlangDecodeException ( "Cannot read from input stream" ) ; } return i ; }
Read an array of bytes from the stream . The method reads at most len bytes from the input stream into offset off of the buffer .