rice.p2p.util.rawserialization
Class SizeChecker
java.lang.Object
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
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
count
protected int count
SizeChecker
public SizeChecker()
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
Copyright © 2001-2005 - Rice Pastry.