T - the type that can be converted@FunctionalInterface @PublicSpi public interface Marshaller<T>
bytes.
Notes:
| Modifier and Type | Method and Description |
|---|---|
byte[] |
marshallToBytes(T obj)
Responsible for converting a object into an array of bytes.
|
byte[] marshallToBytes(T obj) throws MarshallingException
obj - the object to be converted.MarshallingException - if unable to perform the conversion. Implementors should not wrap all exceptions,
like NullPointerException, with this exception. It should be used to report
specific errors related to doing the marshalling, such as a checked exception
like IOException.Copyright © 2021 Atlassian. All rights reserved.