Package com.google.protobuf
Class GeneratedMessageLite.SerializedForm
java.lang.Object
com.google.protobuf.GeneratedMessageLite.SerializedForm
- All Implemented Interfaces:
Serializable
- Enclosing class:
GeneratedMessageLite<MessageType extends GeneratedMessageLite<MessageType,
BuilderType>, BuilderType extends GeneratedMessageLite.Builder<MessageType, BuilderType>>
protected static final class GeneratedMessageLite.SerializedForm
extends Object
implements Serializable
A serialized (serializable) form of the generated message. Stores the message as a class name
and a byte array.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSerializedForm
(MessageLite regularForm) Creates the serialized form by callingMessageLite.toByteArray()
. -
Method Summary
Modifier and TypeMethodDescriptionof
(MessageLite message) protected Object
When read from an ObjectInputStream, this method converts this object back to the regular form.private Class
<?>
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
messageClass
-
messageClassName
-
asBytes
private final byte[] asBytes
-
-
Constructor Details
-
SerializedForm
SerializedForm(MessageLite regularForm) Creates the serialized form by callingMessageLite.toByteArray()
.- Parameters:
regularForm
- the message to serialize
-
-
Method Details
-
of
-
readResolve
When read from an ObjectInputStream, this method converts this object back to the regular form. Part of Java's serialization magic.- Returns:
- a GeneratedMessage of the type that was serialized
- Throws:
ObjectStreamException
-
resolveMessageClass
- Throws:
ClassNotFoundException
-