Rice Pastry API

rice.p2p.util.rawserialization
Class SizeChecker

java.lang.Object
  extended by rice.p2p.util.rawserialization.SizeChecker
All Implemented Interfaces:
OutputBuffer, SizeCheckOutputBuffer
Direct Known Subclasses:
DirectSizeChecker

public abstract class SizeChecker
extends java.lang.Object
implements SizeCheckOutputBuffer


Field Summary
protected  int count
           
 
Constructor Summary
SizeChecker()
           
 
Method Summary
 int bytesRemaining()
           
 int bytesWritten()
           
 void write(byte[] b, int off, int len)
           
 void writeBoolean(boolean v)
           
 void writeByte(byte v)
           
 void writeChar(char v)
           
 void writeDouble(double v)
           
 void writeFloat(float v)
           
 void writeInt(int v)
           
 void writeLong(long v)
           
 void writeShort(short v)
           
abstract  void writeSpecial(java.lang.Object o)
          Increment count appropriately
 void writeUTF(java.lang.String str)
          This is bogus if you aren't using ascii! Would need to do more introspection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

protected int count
Constructor Detail

SizeChecker

public SizeChecker()
Method Detail

writeSpecial

public abstract void writeSpecial(java.lang.Object o)
                           throws java.io.IOException
Increment count appropriately

Specified by:
writeSpecial in interface SizeCheckOutputBuffer
Throws:
java.io.IOException

bytesWritten

public int bytesWritten()
Specified by:
bytesWritten in interface SizeCheckOutputBuffer

bytesRemaining

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

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Specified by:
write in interface OutputBuffer
Throws:
java.io.IOException

writeBoolean

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

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

writeDouble

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

writeFloat

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

writeInt

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

writeLong

public void writeLong(long v)
               throws java.io.IOException
Specified by:
writeLong 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

writeUTF

public void writeUTF(java.lang.String str)
              throws java.io.IOException
This is bogus if you aren't using ascii! Would need to do more introspection.

Specified by:
writeUTF in interface OutputBuffer
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection