Rice Pastry API

rice.p2p.util.rawserialization
Class SimpleOutputBuffer

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.DataOutputStream
              extended by rice.p2p.util.rawserialization.SimpleOutputBuffer
All Implemented Interfaces:
java.io.Closeable, java.io.DataOutput, java.io.Flushable, OutputBuffer

public class SimpleOutputBuffer
extends java.io.DataOutputStream
implements OutputBuffer


Field Summary
 
Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
SimpleOutputBuffer()
           
SimpleOutputBuffer(int size)
           
 
Method Summary
 int bytesRemaining()
           
 java.nio.ByteBuffer getByteBuffer()
           
 byte[] getBytes()
           
 int getWritten()
          The amount of bytes written so far...
 void writeByte(byte v)
           
 void writeChar(char v)
           
 void writeShort(short v)
           
 
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.FilterOutputStream
close, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface rice.p2p.commonapi.rawserialization.OutputBuffer
write, writeBoolean, writeDouble, writeFloat, writeInt, writeLong, writeUTF
 
Methods inherited from interface java.io.DataOutput
write
 

Constructor Detail

SimpleOutputBuffer

public SimpleOutputBuffer(int size)

SimpleOutputBuffer

public SimpleOutputBuffer()
Method Detail

writeByte

public void writeByte(byte v)
               throws java.io.IOException
Specified by:
writeByte in interface OutputBuffer
Throws:
java.io.IOException

writeChar

public void writeChar(char v)
               throws java.io.IOException
Specified by:
writeChar in interface OutputBuffer
Throws:
java.io.IOException

writeShort

public void writeShort(short v)
                throws java.io.IOException
Specified by:
writeShort in interface OutputBuffer
Throws:
java.io.IOException

bytesRemaining

public int bytesRemaining()
Specified by:
bytesRemaining in interface OutputBuffer

getBytes

public byte[] getBytes()

getByteBuffer

public java.nio.ByteBuffer getByteBuffer()

getWritten

public int getWritten()
The amount of bytes written so far... the size (not the capacity).

Returns:

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection