com.twistedmatrix.spread
Class BananaDecoder
java.lang.Object
|
+--com.twistedmatrix.spread.BananaDecoder
- public class BananaDecoder
- extends java.lang.Object
A decoder for the Banana wire protocol.
Constructor Summary |
BananaDecoder(java.io.InputStream in)
Create a new BananaDecoder. |
Method Summary |
protected java.math.BigInteger |
b1282bigint(byte[] buffer,
int length)
Read a positive big integer from a buffer in b128 format. |
protected int |
b1282int(byte[] buffer,
int length)
Read a positive integer from a buffer in b128 format. |
protected java.lang.Object |
read()
Read the next object from the stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BananaDecoder
public BananaDecoder(java.io.InputStream in)
- Create a new BananaDecoder.
- Parameters:
in
- an InputStream we read from (it will be wrapped in a BufferInputStream).
b1282int
protected int b1282int(byte[] buffer,
int length)
- Read a positive integer from a buffer in b128 format.
b1282bigint
protected java.math.BigInteger b1282bigint(byte[] buffer,
int length)
- Read a positive big integer from a buffer in b128 format.
Why oh why didn't Java implement operator overloaders?
read
protected java.lang.Object read()
throws java.io.IOException,
Banana.ProtocolException
- Read the next object from the stream.