|
|||||||||
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 int |
bufferSize
|
protected ByteOutput |
byteOutput
The current byte output. |
protected ClassExternalizerFactory |
classExternalizerFactory
The configured class externalizer factory. |
protected ClassResolver |
classResolver
The configured class resolver. |
protected ClassTable |
classTable
The configured class table. |
protected int |
configuredVersion
The configured version to write. |
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,
MarshallingConfiguration configuration)
Construct a new marshaller instance. |
Method Summary | |
---|---|
void |
close()
|
protected void |
doStart()
Perform any marshaller-specific start activity. |
protected abstract void |
doWriteObject(java.lang.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)
Write all the bytes from the given array to the stream. |
void |
write(byte[] bytes,
int off,
int len)
Write some of the bytes from the given array to the stream. |
void |
write(int v)
Writes to the output stream the eight low-order bits of the argument b . |
void |
writeBoolean(boolean v)
|
void |
writeByte(int v)
|
void |
writeBytes(java.lang.String s)
|
void |
writeChar(int v)
|
void |
writeChars(java.lang.String s)
|
void |
writeDouble(double v)
|
void |
writeFloat(float v)
|
void |
writeInt(int v)
|
void |
writeLong(long v)
|
void |
writeObject(java.lang.Object obj)
|
void |
writeObjectUnshared(java.lang.Object obj)
Write an object to the underlying storage or stream as a new instance. |
void |
writeShort(int v)
|
void |
writeUTF(java.lang.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 ClassExternalizerFactory classExternalizerFactory
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 final int configuredVersion
protected ByteOutput byteOutput
protected final int bufferSize
Constructor Detail |
---|
protected AbstractMarshaller(AbstractMarshallerFactory marshallerFactory, MarshallingConfiguration configuration)
marshallerFactory
- the marshaller factoryconfiguration
- Method Detail |
---|
public void write(int v) throws java.io.IOException
b
. The 24 high-order bits of
b
are ignored.
write
in interface java.io.DataOutput
write
in interface java.io.ObjectOutput
write
in interface ByteOutput
v
- the byte to write
java.io.IOException
- if an error occurspublic void write(byte[] bytes) throws java.io.IOException
write
in interface java.io.DataOutput
write
in interface java.io.ObjectOutput
write
in interface ByteOutput
bytes
- the byte array
java.io.IOException
- if an error occurspublic void write(byte[] bytes, int off, int len) throws java.io.IOException
write
in interface java.io.DataOutput
write
in interface java.io.ObjectOutput
write
in interface ByteOutput
bytes
- the byte arrayoff
- the index to start writing fromlen
- the number of bytes to write
java.io.IOException
- if an error occurspublic void writeBoolean(boolean v) throws java.io.IOException
writeBoolean
in interface java.io.DataOutput
java.io.IOException
public void writeByte(int v) throws java.io.IOException
writeByte
in interface java.io.DataOutput
java.io.IOException
public void writeShort(int v) throws java.io.IOException
writeShort
in interface java.io.DataOutput
java.io.IOException
public void writeChar(int v) throws java.io.IOException
writeChar
in interface java.io.DataOutput
java.io.IOException
public void writeInt(int v) throws java.io.IOException
writeInt
in interface java.io.DataOutput
java.io.IOException
public void writeLong(long v) throws java.io.IOException
writeLong
in interface java.io.DataOutput
java.io.IOException
public void writeFloat(float v) throws java.io.IOException
writeFloat
in interface java.io.DataOutput
java.io.IOException
public void writeDouble(double v) throws java.io.IOException
writeDouble
in interface java.io.DataOutput
java.io.IOException
public void writeBytes(java.lang.String s) throws java.io.IOException
writeBytes
in interface java.io.DataOutput
java.io.IOException
public void writeChars(java.lang.String s) throws java.io.IOException
writeChars
in interface java.io.DataOutput
java.io.IOException
public void writeUTF(java.lang.String s) throws java.io.IOException
writeUTF
in interface java.io.DataOutput
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in interface java.io.ObjectOutput
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.io.ObjectOutput
java.io.IOException
public void start(ByteOutput byteOutput) throws java.io.IOException
start
in interface Marshaller
byteOutput
- the new stream
java.io.IOException
- if an error occurs during setup, such as an error writing the headerpublic void finish() throws java.io.IOException
Marshaller.start(ByteOutput)
method is again invoked.
finish
in interface Marshaller
java.io.IOException
- if an error occursprotected abstract void doWriteObject(java.lang.Object obj, boolean unshared) throws java.io.IOException
obj
- the object to writeunshared
- true
if the instance is unshared, false
if it is shared
java.io.IOException
- if an I/O error occurspublic final void writeObjectUnshared(java.lang.Object obj) throws java.io.IOException
writeObjectUnshared
in interface Marshaller
obj
- the object to be written
java.io.IOException
- if an error occurspublic final void writeObject(java.lang.Object obj) throws java.io.IOException
writeObject
in interface java.io.ObjectOutput
java.io.IOException
protected void doStart() throws java.io.IOException
java.io.IOException
- if I/O exception occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |