Class DataSerializer.NullableDataSerializer<T>
java.lang.Object
ru.progrm_jarvis.javacommons.data.DataSerializer.NullableDataSerializer<T>
- All Implemented Interfaces:
DataSerializer<@Nullable T>
- Enclosing interface:
- DataSerializer<T>
public static final class DataSerializer.NullableDataSerializer<T>
extends Object
implements DataSerializer<@Nullable T>
Data serializer for nullable types.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ru.progrm_jarvis.javacommons.data.DataSerializer
DataSerializer.NullableDataSerializer<T>, DataSerializer.OptionalDataSerializer<T> -
Method Summary
Modifier and TypeMethodDescriptionread(@NotNull DataInputStream input) Reads the object from the given input stream.voidwrite(@NotNull DataOutputStream output, T object) Writes the object into the given output stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ru.progrm_jarvis.javacommons.data.DataSerializer
fromByteArray, fromByteArrayUnchecked, nullable, optional, readUnchecked, toByteArray, toByteArray, toByteArrayUnchecked, toByteArrayUnchecked, writeUnchecked
-
Method Details
-
write
Description copied from interface:DataSerializerWrites the object into the given output stream.- Specified by:
writein interfaceDataSerializer<T>- Parameters:
output- output in which the output should be writtenobject- object to be written into the output stream- Throws:
IOException- if an error happens while writing
-
read
Description copied from interface:DataSerializerReads the object from the given input stream.- Specified by:
readin interfaceDataSerializer<T>- Parameters:
input- input from which the object should be read- Returns:
- read object
- Throws:
IOException- if an error happens while reading
-