Package io.github.astrapisixtynine.fury
Klasse ObjectToBytesExtensions
java.lang.Object
io.github.astrapisixtynine.fury.ObjectToBytesExtensions
Utility class for converting Java objects to byte arrays
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic <T> byte[]
Converts an object to a byte array using a specific Fury instancestatic <T> byte[]
Converts an object to a byte array
-
Konstruktordetails
-
ObjectToBytesExtensions
public ObjectToBytesExtensions()
-
-
Methodendetails
-
toBytes
Converts an object to a byte array- Typparameter:
T
- the type of the object to be serialized- Parameter:
object
- the object to be serializedregisterClasses
- classes that need to be registered for serialization- Gibt zurück:
- the serialized byte array
-
toBytes
public static <T> byte[] toBytes(@NonNull @NonNull org.apache.fury.Fury fury, @NonNull T object, Class<?>... registerClasses) Converts an object to a byte array using a specific Fury instance- Typparameter:
T
- the type of the object to be serialized- Parameter:
fury
- the Fury instance used for serializationobject
- the object to be serializedregisterClasses
- classes that need to be registered for serialization- Gibt zurück:
- the serialized byte array
-