private final int _decodeExplicitLength(int lowBits) throws IOException {
  if (lowBits == 31) {
    return -1;
  }
  if (lowBits <= 23) {
    return lowBits;
  }
switch (lowBits - 24) {
case 0:
    return _decode8Bits();
case 1:
  return _decode16Bits();
case 2:
return _decode32Bits();
case 3:
long l=_decode64Bits();
if (l < 0 || l > MAX_INT_L) {
throw _constructError("Illegal length for " + getCurrentToken() + ": "+ l);
}
return (int)l;
}
throw _constructError("Invalid length for " + getCurrentToken() + ": 0x"+ Integer.toHexString(lowBits));
}

private final int _decodeExplicitLength ( int lowBits ) throws IOException { if ( lowBits == 31 ) { return - 1 ; } if ( lowBits <= 23 ) { return lowBits ; } switch ( lowBits - 24 ) { case 0 : return _decode8Bits ( ) ; case 1 : return _decode16Bits ( ) ; case 2 : return _decode32Bits ( ) ; case 3 : long l = _decode64Bits ( ) ; if ( l < 0 || l > MAX_INT_L ) { throw _constructError ( "Illegal length for " + getCurrentToken ( ) + ": " + l ) ; } return ( int ) l ; } throw _constructError ( "Invalid length for " + getCurrentToken ( ) + ": 0x" + Integer . toHexString ( lowBits ) ) ; }
method used to decode explicit length of a variable - length value ( or , for indefinite / chunked , indicate that one is not known ) . note that long ( 64 - bit ) length is only allowed if it fits in 32 - bit signed int , for now ; expectation being that longer values are always encoded as chunks .
