@Override
public Object parseObject(final ObjectHeader header, final ByteBuf buffer) throws PCEPDeserializerException {
checkArgument(buffer != null && buffer.isReadable(), "Array of bytes is mandatory. Cannot be null or empty.");
- buffer.readBytes(RESERVED);
+ buffer.skipBytes(RESERVED);
final BitArray flagBits = BitArray.valueOf(buffer, FLAGS_SIZE);
final Flags flags = new Flags(flagBits.get(G_FLAG_POS), flagBits.get(I_FLAG_POS), flagBits.get(L_FLAG_POS),
flagBits.get(C_FLAG_POS), flagBits.get(P_FLAG_POS));
public Of parseObject(final ObjectHeader header, final ByteBuf bytes) throws PCEPDeserializerException {
checkArgument(bytes != null && bytes.isReadable(), "Array of bytes is mandatory. Can't be null or empty.");
final Uint16 ofId = ByteBufUtils.readUint16(bytes);
- bytes.readBytes(RESERVED);
+ bytes.skipBytes(RESERVED);
final TlvsBuilder tlvsBuilder = new TlvsBuilder();
parseTlvs(tlvsBuilder, bytes.slice());
return new OfBuilder()
@Override
public Object parseObject(final ObjectHeader header, final ByteBuf buffer) throws PCEPDeserializerException {
checkArgument(buffer != null && buffer.isReadable(), "Array of bytes is mandatory. Can't be null or empty.");
- buffer.readBytes(RESERVED + FLAGS);
+ buffer.skipBytes(RESERVED + FLAGS);
return new OverloadBuilder()
.setDuration(ByteBufUtils.readUint16(buffer))
.build();