in Server/java/src/main/java/com/company/apptoken/model/AppTokenOptions.java [19:35]
public void pack(@NonNull ByteBuf buf) {
final boolean hasEngineOptions = Objects.nonNull(this.engineOptions);
buf.writeBoolean(hasEngineOptions);
if (!hasEngineOptions) {
return;
}
buf.writeInt(this.engineOptions.size());
for (Map.Entry<String, String> entry : this.engineOptions.entrySet()) {
if (Objects.isNull(entry) || Objects.isNull(entry.getKey()) || Objects.isNull(entry.getValue())) {
throw new IllegalArgumentException("illegal engineOptions entry");
}
buf.writeInt(entry.getKey().length());
buf.writeBytes(entry.getKey().getBytes());
buf.writeInt(entry.getValue().length());
buf.writeBytes(entry.getValue().getBytes());
}
}