JBoss Marshalling 1.4.3.Final

org.jboss.marshalling
Class ByteWriter

java.lang.Object
  extended by org.jboss.marshalling.ByteWriter
All Implemented Interfaces:
ClassTable.Writer, ObjectTable.Writer

public final class ByteWriter
extends Object
implements ObjectTable.Writer, ClassTable.Writer

A writer for class or object tables which simply writes a flat sequence of bytes.

Author:
David M. Lloyd

Constructor Summary
ByteWriter(byte... bytes)
          Construct a new instance.
 
Method Summary
 void 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteWriter

public ByteWriter(byte... bytes)
Construct a new instance.

Parameters:
bytes - the bytes to write
Method Detail

writeObject

public void writeObject(Marshaller marshaller,
                        Object object)
                 throws IOException
Description copied from interface: ObjectTable.Writer
Write the predefined object reference to the stream.

Specified by:
writeObject in interface ObjectTable.Writer
Parameters:
marshaller - the marshaller to write to
object - the object reference to write
Throws:
IOException - if an I/O error occurs

writeClass

public void writeClass(Marshaller marshaller,
                       Class<?> clazz)
                throws IOException
Description copied from interface: ClassTable.Writer
Write the predefined class reference to the stream.

Specified by:
writeClass in interface ClassTable.Writer
Parameters:
marshaller - the marshaller to write to
clazz - the class reference to write
Throws:
IOException - if an I/O error occurs

JBoss Marshalling 1.4.3.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.