private void parseBootstrapClientSync(ClientSync sync, ByteBuffer buf, int options, int payloadLength) { int requestId = buf.getShort(); int protocolCount = buf.getShort(); List<ProtocolVersionId> keys = new ArrayList<>(protocolCount); for (int i = 0; i < protocolCount; i++) { keys.add(new ProtocolVersionId(buf.getInt(), buf.getShort())); // reserved buf.getShort(); } sync.setBootstrapSync(new BootstrapClientSync(requestId, keys)); }
private static BootstrapClientSync convert(BootstrapSyncRequest source) { if (source == null) { return null; } return new BootstrapClientSync(source.getRequestId(), convert(source.getSupportedProtocols())); }