T - The type of object to serialize.public interface Serializer<T>
Serializer is able to convert a Java object into a formatted byte stream. It is expected this byte stream
can be reconstituted back into a Java object with a matching Deserializer.| Modifier and Type | Method and Description |
|---|---|
byte[] |
serialize(T t)
Deprecated.
since 0.12.0 in favor of
serialize(Object, OutputStream) |
void |
serialize(T t,
OutputStream out)
Converts the specified Java object into a formatted data byte stream, writing the bytes to the specified
output stream. |
@Deprecated byte[] serialize(T t) throws SerializationException
serialize(Object, OutputStream)t - the object to serializeSerializationException - if there is a problem converting the object to a byte array.void serialize(T t, OutputStream out) throws SerializationException
output stream.t - the object to convert to a byte streamout - the stream to write toSerializationException - if there is a problem converting the object to a byte stream or writing the
bytes to the output stream.Copyright © 2014–2024 jsonwebtoken.io. All rights reserved.