public final class BlockMarshaller extends java.lang.Object implements Marshaller, ExtendedObjectStreamConstants
TC_CLASSTABLEDESC, TC_OBJECTTABLE
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
Modifier and Type | Method and Description |
---|---|
void |
clearClassCache()
Discard the class cache.
|
void |
clearInstanceCache()
Discard the instance cache.
|
void |
close() |
void |
finish()
Finish marshalling to a stream.
|
void |
flush() |
void |
start(ByteOutput newOutput)
Begin marshalling to a stream.
|
void |
write(byte[] b)
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) |
public void start(ByteOutput newOutput) throws java.io.IOException
Marshaller
start
in interface Marshaller
newOutput
- the new streamjava.io.IOException
- if an error occurs during setup, such as an error writing the headerpublic void clearInstanceCache() throws java.io.IOException
Marshaller
clearInstanceCache
in interface Marshaller
java.io.IOException
- if an error occurspublic void clearClassCache() throws java.io.IOException
Marshaller
clearClassCache
in interface Marshaller
java.io.IOException
- if an error occurspublic void finish() throws java.io.IOException
Marshaller
Marshaller.start(ByteOutput)
method is again invoked.finish
in interface Marshaller
java.io.IOException
- if an error occurspublic void writeObject(java.lang.Object obj) throws java.io.IOException
writeObject
in interface java.io.ObjectOutput
java.io.IOException
public void writeObjectUnshared(java.lang.Object obj) throws java.io.IOException
Marshaller
writeObjectUnshared
in interface Marshaller
obj
- the object to be writtenjava.io.IOException
- if an error occurspublic void write(int v) throws java.io.IOException
ByteOutput
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 writejava.io.IOException
- if an error occurspublic void write(byte[] b) throws java.io.IOException
ByteOutput
write
in interface java.io.DataOutput
write
in interface java.io.ObjectOutput
write
in interface ByteOutput
b
- the byte arrayjava.io.IOException
- if an error occurspublic void write(byte[] bytes, int off, int len) throws java.io.IOException
ByteOutput
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 writejava.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
close
in interface java.lang.AutoCloseable
java.io.IOException
Copyright © 2011 JBoss, a division of Red Hat, Inc.