public final class BlockMarshaller extends Object implements Marshaller
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(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) |
public void start(ByteOutput newOutput) throws IOException
Marshaller
start
in interface Marshaller
newOutput
- the new streamIOException
- if an error occurs during setup, such as an error writing the headerpublic void clearInstanceCache() throws IOException
Marshaller
clearInstanceCache
in interface Marshaller
IOException
- if an error occurspublic void clearClassCache() throws IOException
Marshaller
clearClassCache
in interface Marshaller
IOException
- if an error occurspublic void finish() throws IOException
Marshaller
Marshaller.start(ByteOutput)
method is again invoked.finish
in interface Marshaller
IOException
- if an error occurspublic void writeObject(Object obj) throws IOException
writeObject
in interface ObjectOutput
IOException
public void writeObjectUnshared(Object obj) throws IOException
Marshaller
writeObjectUnshared
in interface Marshaller
obj
- the object to be writtenIOException
- if an error occurspublic void write(int v) throws IOException
ByteOutput
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 writeIOException
- if an error occurspublic void write(byte[] b) throws IOException
ByteOutput
write
in interface DataOutput
write
in interface ObjectOutput
write
in interface ByteOutput
b
- the byte arrayIOException
- if an error occurspublic void write(byte[] bytes, int off, int len) throws IOException
ByteOutput
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 writeIOException
- 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
public void close() throws IOException
close
in interface Closeable
close
in interface ObjectOutput
close
in interface AutoCloseable
IOException
Copyright © 2021 JBoss by Red Hat. All rights reserved.