public BEValue bdecodeBytes ( ) throws IOException { int c = this . getNextIndicator ( ) ; int num = c - ' ' ; if ( num < 0 || num > 9 ) throw new InvalidBEncodingException ( "Number expected, not '" + ( char ) c + "'" ) ; this . indicator = 0 ; c = this . read ( ) ; int i = c - ' ' ; while ( i >= 0 && i <= 9 ) { // This can overflow! num = num * 10 + i ; c = this . read ( ) ; i = c - ' ' ; } if ( c != ' ' ) { throw new InvalidBEncodingException ( "Colon expected, not '" + ( char ) c + "'" ) ; } return new BEValue ( read ( num ) ) ; }
Returns the next b - encoded value on the stream and makes sure it is a byte array .