|
Marshalling API version 1.0.0.Beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.marshalling.AbstractMarshaller
public abstract class AbstractMarshaller
An abstract implementation of the Marshaller
interface. Most of the
write methods delegate directly to the current data output.
Field Summary | |
---|---|
protected ByteOutput |
byteOutput
The current byte output. |
protected ClassResolver |
classResolver
The configured class resolver. |
protected ClassTable |
classTable
The configured class table. |
protected Creator |
creator
The configured object creator. |
protected ExternalizerFactory |
externalizerFactory
The configured externalizer factory. |
protected ObjectResolver |
objectResolver
The configured object resolver. |
protected ObjectTable |
objectTable
The configured object table. |
protected StreamHeader |
streamHeader
The configured stream header. |
Constructor Summary | |
---|---|
protected |
AbstractMarshaller(AbstractMarshallerFactory marshallerFactory,
Configuration configuration)
Construct a new marshaller instance. |
Method Summary | |
---|---|
void |
close()
|
protected abstract void |
doWriteObject(Object obj,
boolean unshared)
Implementation of the actual object-writing method. |
void |
finish()
Finish marshalling to a stream. |
void |
flush()
|
void |
start(ByteOutput byteOutput)
Begin marshalling to a stream. |
void |
write(byte[] bytes)
|
void |
write(byte[] bytes,
int off,
int len)
|
void |
write(int v)
|
void |
writeBoolean(boolean v)
|
void |
writeByte(int v)
|
void |
writeBytes(String s)
|
void |
writeChar(int v)
|
void |
writeChars(String s)
|
void |
writeDouble(double v)
|
void |
writeFloat(float v)
|
void |
writeInt(int v)
|
void |
writeLong(long v)
|
void |
writeObject(Object obj)
|
void |
writeObjectUnshared(Object obj)
Write an object to the underlying storage or stream as a new instance. |
void |
writeShort(int v)
|
void |
writeUTF(String s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.marshalling.Marshaller |
---|
clearClassCache, clearInstanceCache |
Field Detail |
---|
protected final ExternalizerFactory externalizerFactory
protected final StreamHeader streamHeader
protected final ClassResolver classResolver
protected final ObjectResolver objectResolver
protected final Creator creator
protected final ClassTable classTable
protected final ObjectTable objectTable
protected ByteOutput byteOutput
Constructor Detail |
---|
protected AbstractMarshaller(AbstractMarshallerFactory marshallerFactory, Configuration configuration)
marshallerFactory
- the marshaller factoryconfiguration
- Method Detail |
---|
public void write(int v) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
IOException
public void write(byte[] bytes) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
IOException
public void write(byte[] bytes, int off, int len) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
IOException
public void writeBoolean(boolean v) throws IOException
writeBoolean
in interface DataOutput
IOException
public void writeByte(int v) throws IOException
writeByte
in interface DataOutput
IOException
public void writeShort(int v) throws IOException
writeShort
in interface DataOutput
IOException
public void writeChar(int v) throws IOException
writeChar
in interface DataOutput
IOException
public void writeInt(int v) throws IOException
writeInt
in interface DataOutput
IOException
public void writeLong(long v) throws IOException
writeLong
in interface DataOutput
IOException
public void writeFloat(float v) throws IOException
writeFloat
in interface DataOutput
IOException
public void writeDouble(double v) throws IOException
writeDouble
in interface DataOutput
IOException
public void writeBytes(String s) throws IOException
writeBytes
in interface DataOutput
IOException
public void writeChars(String s) throws IOException
writeChars
in interface DataOutput
IOException
public void writeUTF(String s) throws IOException
writeUTF
in interface DataOutput
IOException
public void flush() throws IOException
flush
in interface ObjectOutput
IOException
public void close() throws IOException
close
in interface ObjectOutput
IOException
public void start(ByteOutput byteOutput) throws IOException
start
in interface Marshaller
byteOutput
- the new stream
IOException
- if an error occurs during setup, such as an error writing the headerpublic void finish() throws IOException
Marshaller.start(ByteOutput)
method is again invoked.
finish
in interface Marshaller
IOException
- if an error occursprotected abstract void doWriteObject(Object obj, boolean unshared) throws IOException
obj
- the object to writeunshared
- true
if the instance is unshared, false
if it is shared
IOException
- if an I/O error occurspublic final void writeObjectUnshared(Object obj) throws IOException
writeObjectUnshared
in interface Marshaller
obj
- the object to be written
IOException
- if an error occurspublic final void writeObject(Object obj) throws IOException
writeObject
in interface ObjectOutput
IOException
|
Marshalling API version 1.0.0.Beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |