Package dev.enola.common.protobuf
Class ProtoIO
java.lang.Object
dev.enola.common.protobuf.ProtoIO
Converts Protocol Buffer
Messages from/to TextFormat, JsonFormat and
YAML.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated.voidconvert(ReadableResource in, com.google.protobuf.Message.Builder builder, WritableResource out) Deprecated.<B extends com.google.protobuf.Message.Builder>
Bread(ReadableResource resource, B builder) <M extends com.google.protobuf.Message>
Mread(ReadableResource resource, com.google.protobuf.Message.Builder builder, Class<M> messageClass) voidwrite(com.google.protobuf.Message message, WritableResource resource)
-
Constructor Details
-
ProtoIO
-
ProtoIO
public ProtoIO()
-
-
Method Details
-
check
@Deprecated public static void check(String pathToResourceOnClasspath, com.google.protobuf.Message.Builder builder) throws IOException Deprecated.- Throws:
IOException
-
write
public void write(com.google.protobuf.Message message, WritableResource resource) throws IOException - Throws:
IOException
-
read
public <B extends com.google.protobuf.Message.Builder> B read(ReadableResource resource, B builder) throws IOException - Throws:
IOException
-
read
public <M extends com.google.protobuf.Message> M read(ReadableResource resource, com.google.protobuf.Message.Builder builder, Class<M> messageClass) throws IOException - Throws:
IOException
-
convert
@Deprecated public void convert(ReadableResource in, com.google.protobuf.Message.Builder builder, WritableResource out) throws IOException Deprecated.Deprecated; switch to using MessageResourceConverter.- Throws:
IOException
-