in serialization/src/main/java/com/twitter/serial/util/SerializationUtils.java [46:61]
public static boolean writeNullIndicator(@NotNull SerializerOutput output, @Nullable Object object)
throws IOException {
if (object == null) {
if (output.isPeekSupported()) {
output.writeNull();
} else {
output.writeByte(ObjectSerializer.NULL_OBJECT);
}
return true;
} else {
if (!output.isPeekSupported()) {
output.writeByte(ObjectSerializer.NOT_NULL_OBJECT);
}
return false;
}
}