public class BinaryFormatUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BinaryFormatUtils.FieldInfo
Field info data holder with convenience methods.
|
Constructor and Description |
---|
BinaryFormatUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
consumeMessage(net.morimekta.util.io.BigEndianBinaryReader in,
boolean readStrict)
Consume a message from the stream without parsing the content into a message.
|
static Object |
readFieldValue(net.morimekta.util.io.BigEndianBinaryReader in,
BinaryFormatUtils.FieldInfo fieldInfo,
PDescriptor type,
boolean readStrict)
Read a field value from stream.
|
static <Message extends PMessage<Message,Field>,Field extends PField> |
readMessage(net.morimekta.util.io.BigEndianBinaryReader input,
PMessageDescriptor<Message,Field> descriptor,
boolean readStrict) |
static <Message extends PMessage<Message,Field>,Field extends PField> |
writeMessage(net.morimekta.util.io.BigEndianBinaryWriter writer,
Message message) |
public static <Message extends PMessage<Message,Field>,Field extends PField> Message readMessage(net.morimekta.util.io.BigEndianBinaryReader input, PMessageDescriptor<Message,Field> descriptor, boolean readStrict) throws IOException
IOException
public static void consumeMessage(net.morimekta.util.io.BigEndianBinaryReader in, boolean readStrict) throws IOException
in
- Stream to read message from.IOException
public static Object readFieldValue(net.morimekta.util.io.BigEndianBinaryReader in, BinaryFormatUtils.FieldInfo fieldInfo, PDescriptor type, boolean readStrict) throws IOException
in
- The stream to consume.fieldInfo
- The field info about the content.type
- The type to generate content for.IOException
- If unable to read from stream or invalid field type.public static <Message extends PMessage<Message,Field>,Field extends PField> int writeMessage(net.morimekta.util.io.BigEndianBinaryWriter writer, Message message) throws IOException
IOException
Copyright © 2015–2017 morimekta.net. All rights reserved.