@ThreadSafe
public interface StreamAwareMarshaller
InputStream/OutputStream. Unlike the deprecated StreamingMarshaller this interface
does not rely on the use of ObjectInput and ObjectOutput to read/write objects,
which provides greater flexibility when marshalling objects to streams using third party libraries.| Modifier and Type | Method and Description |
|---|---|
boolean |
isMarshallable(Object o)
A method that checks whether the given object is marshallable as per the rules of this marshaller.
|
MediaType |
mediaType() |
Object |
readObject(InputStream in)
Unmarshall an object from the
InputStream |
int |
sizeEstimate(Object o)
An method that provides an estimate of the buffer size that will be required once the object has been marshalled.
|
void |
writeObject(Object o,
OutputStream out)
Marshall an object to the
OutputStream |
void writeObject(Object o, OutputStream out) throws IOException
OutputStreamo - the object to write to the OutputStreamout - the OutputStream to write the object toIOException - if the object cannot be marshalled to the OutputStream due to some I/O errorObject readObject(InputStream in) throws ClassNotFoundException, IOException
InputStreamin - the InputStream to unmarshall an object fromIOException - if unmarshalling cannot complete due to some I/O errorClassNotFoundException - if the class of the object trying to unmarshall is not foundboolean isMarshallable(Object o)
o - object to verify whether it's marshallable or notint sizeEstimate(Object o)
o - instance that will be stored in the buffer.Copyright © 2022 JBoss by Red Hat. All rights reserved.