Package org.jboss.marshalling
Class ByteWriter
java.lang.Object
org.jboss.marshalling.ByteWriter
- All Implemented Interfaces:
ClassTable.Writer
,ObjectTable.Writer
A writer for class or object tables which simply writes a flat sequence of bytes.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
writeClass
(Marshaller marshaller, Class<?> clazz) Write the predefined class reference to the stream.void
writeObject
(Marshaller marshaller, Object object) Write the predefined object reference to the stream.
-
Field Details
-
bytes
private final byte[] bytes
-
-
Constructor Details
-
ByteWriter
public ByteWriter(byte... bytes) Construct a new instance.- Parameters:
bytes
- the bytes to write
-
-
Method Details
-
writeObject
Description copied from interface:ObjectTable.Writer
Write the predefined object reference to the stream.- Specified by:
writeObject
in interfaceObjectTable.Writer
- Parameters:
marshaller
- the marshaller to write toobject
- the object reference to write- Throws:
IOException
- if an I/O error occurs
-
writeClass
Description copied from interface:ClassTable.Writer
Write the predefined class reference to the stream.- Specified by:
writeClass
in interfaceClassTable.Writer
- Parameters:
marshaller
- the marshaller to write toclazz
- the class reference to write- Throws:
IOException
- if an I/O error occurs
-