Source:
<code><START> public void skipValue() throws IOException { <END> int remainingValues = 1; while(!reachedEOF && remainingValues > 0) { MessageFormat f = getNextFormat(); byte b = consume(); switch(f) { case POSFIXINT: case NEGFIXINT: case BOOLEAN: case NIL: break; case FIXMAP: { int mapLen = b & 0x0f; remainingValues += mapLen * 2; break; } case FIXARRAY: { int arrayLen = b & 0x0f; remainingValues += arrayLen; break; } case FIXSTR: { int strLen = b & 0x1f; consume(strLen); break; } case INT8: case UINT8: consume(1); break; case INT16: case UINT16: consume(2); break; case INT32: case UINT32: case FLOAT32: consume(4); break; case INT64: case UINT64: case FLOAT64: consume(8); break; case BIN8: case STR8: consume(readNextLength8()); break; case BIN16: case STR16: consume(readNextLength16()); break; case BIN32: case STR32: consume(readNextLength32()); break; case FIXEXT1: consume(2); break; case FIXEXT2: consume(3); break; case FIXEXT4: consume(5); break; case FIXEXT8: consume(9); break; case FIXEXT16: consume(17); break; case EXT8: consume(readNextLength8() + 1); break; case EXT16: consume(readNextLength16() + 1); break; case EXT32: consume(readNextLength32() + 1); break; case ARRAY16: remainingValues += readNextLength16(); consume(2); break; case ARRAY32: remainingValues += readNextLength32(); consume(4); break; case MAP16: remainingValues += readNextLength16() * 2; consume(2); break; case MAP32: remainingValues += readNextLength32() * 2; consume(2); break; case NEVER_USED: throw new MessageFormatException(String.format("unknown code: %02x is found", b)); } remainingValues--; } }</code><technical_language>consume(int) support skipping buffer boundary? I guess another method skip(int) is necessary</technical_language>

Target:
public void skipValue() throws IOException { int remainingValues = 1; while(remainingValues > 0) { if(reachedEOF) { throw new EOFException(); } MessageFormat f = getNextFormat(); byte b = consume(); switch(f) { case POSFIXINT: case NEGFIXINT: case BOOLEAN: case NIL: break; case FIXMAP: { int mapLen = b & 0x0f; remainingValues += mapLen * 2; break; } case FIXARRAY: { int arrayLen = b & 0x0f; remainingValues += arrayLen; break; } case FIXSTR: { int strLen = b & 0x1f; consume(strLen); break; } case INT8: case UINT8: consume(1); break; case INT16: case UINT16: consume(2); break; case INT32: case UINT32: case FLOAT32: consume(4); break; case INT64: case UINT64: case FLOAT64: consume(8); break; case BIN8: case STR8: consume(readNextLength8()); break; case BIN16: case STR16: consume(readNextLength16()); break; case BIN32: case STR32: consume(readNextLength32()); break; case FIXEXT1: consume(2); break; case FIXEXT2: consume(3); break; case FIXEXT4: consume(5); break; case FIXEXT8: consume(9); break; case FIXEXT16: consume(17); break; case EXT8: consume(readNextLength8() + 1); break; case EXT16: consume(readNextLength16() + 1); break; case EXT32: consume(readNextLength32() + 1); break; case ARRAY16: remainingValues += readNextLength16(); consume(2); break; case ARRAY32: remainingValues += readNextLength32(); consume(4); break; case MAP16: remainingValues += readNextLength16() * 2; consume(2); break; case MAP32: remainingValues += readNextLength32() * 2; consume(2); break; case NEVER_USED: throw new MessageFormatException(String.format("unknown code: %02x is found", b)); } remainingValues--; } }