|
JBoss Marshalling 1.2.1.GA | |||||||||
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 ExceptionListener |
exceptionListener
The configured exception listener. |
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(Object obj,
boolean unshared)
Implementation of the actual object-writing method. |
void |
finish()
Finish marshalling to a stream. |
void |
flush()
|
protected void |
shallowFlush()
This shallow flush will write the internal buffer out to the ByteOutput , but will not flush it. |
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(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 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 ExceptionListener exceptionListener
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 IOException
b
. The 24 high-order bits of
b
are ignored.
write
in interface DataOutput
write
in interface ObjectOutput
write
in interface ByteOutput
v
- the byte to write
IOException
- if an error occurspublic void write(byte[] bytes) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
write
in interface ByteOutput
bytes
- the byte array
IOException
- if an error occurspublic void write(byte[] bytes, int off, int len) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
write
in interface ByteOutput
bytes
- the byte arrayoff
- the index to start writing fromlen
- the number of bytes to write
IOException
- if an error occurspublic 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 Flushable
flush
in interface ObjectOutput
IOException
protected void shallowFlush() throws IOException
ByteOutput
, but will not flush it.
IOException
- if an I/O error occurspublic void close() throws IOException
close
in interface Closeable
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
protected void doStart() throws IOException
IOException
- if I/O exception occurs
|
JBoss Marshalling 1.2.1.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |