|
JBoss Marshalling 1.4.3.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.jboss.marshalling.SimpleByteOutput
org.jboss.marshalling.ByteOutputStream
org.jboss.marshalling.SimpleDataOutput
public class SimpleDataOutput

A simple base implementation of DataOutput which wraps a ByteOutput. This implementation maintains
an internal buffer.
| Field Summary | |
|---|---|
protected byte[] |
buffer
The internal buffer. |
protected int |
bufferSize
The size of the internal buffer. |
| Fields inherited from class org.jboss.marshalling.ByteOutputStream |
|---|
byteOutput |
| Constructor Summary | |
|---|---|
SimpleDataOutput(ByteOutput byteOutput)
Construct a new instance with a default buffer size. |
|
SimpleDataOutput(int bufferSize)
Construct a new instance. |
|
SimpleDataOutput(int bufferSize,
ByteOutput byteOutput)
Construct a new instance. |
|
| Method Summary | |
|---|---|
void |
close()
|
protected void |
finish()
Finish writing 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. |
protected void |
start(ByteOutput byteOutput)
Begin writing 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 |
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 |
| Field Detail |
|---|
protected final int bufferSize
protected byte[] buffer
| Constructor Detail |
|---|
public SimpleDataOutput(int bufferSize)
bufferSize - the buffer size
public SimpleDataOutput(int bufferSize,
ByteOutput byteOutput)
bufferSize - the buffer sizebyteOutput - the byte output to wrappublic SimpleDataOutput(ByteOutput byteOutput)
byteOutput - the byte output to wrap| Method Detail |
|---|
public void write(int v)
throws IOException
b. The 24 high-order bits of
b are ignored.
write in interface DataOutputwrite in interface ByteOutputwrite in class ByteOutputStreamv - the byte to write
IOException - if an error occurs
public void write(byte[] bytes)
throws IOException
write in interface DataOutputwrite in interface ByteOutputwrite in class ByteOutputStreambytes - the byte array
IOException - if an error occurs
public void write(byte[] bytes,
int off,
int len)
throws IOException
write in interface DataOutputwrite in interface ByteOutputwrite in class ByteOutputStreambytes - the byte arrayoff - the index to start writing fromlen - the number of bytes to write
IOException - if an error occurs
public void writeBoolean(boolean v)
throws IOException
writeBoolean in interface DataOutputIOException
public void writeByte(int v)
throws IOException
writeByte in interface DataOutputIOException
public void writeShort(int v)
throws IOException
writeShort in interface DataOutputIOException
public void writeChar(int v)
throws IOException
writeChar in interface DataOutputIOException
public void writeInt(int v)
throws IOException
writeInt in interface DataOutputIOException
public void writeLong(long v)
throws IOException
writeLong in interface DataOutputIOException
public void writeFloat(float v)
throws IOException
writeFloat in interface DataOutputIOException
public void writeDouble(double v)
throws IOException
writeDouble in interface DataOutputIOException
public void writeBytes(String s)
throws IOException
writeBytes in interface DataOutputIOException
public void writeChars(String s)
throws IOException
writeChars in interface DataOutputIOException
public void writeUTF(String s)
throws IOException
writeUTF in interface DataOutputIOException
public void flush()
throws IOException
flush in interface Flushableflush in class ByteOutputStreamIOException
protected void shallowFlush()
throws IOException
ByteOutput, but will not flush it.
IOException - if an I/O error occurs
protected void start(ByteOutput byteOutput)
throws IOException
byteOutput - the new stream
IOException - if an error occurs
protected void finish()
throws IOException
start(ByteOutput) method is again invoked.
IOException - if an error occurs
public void close()
throws IOException
close in interface Closeableclose in class ByteOutputStreamIOException
|
JBoss Marshalling 1.4.3.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||