com.twistedmatrix.spread
Class BananaEncoder

java.lang.Object
  |
  +--com.twistedmatrix.spread.BananaEncoder

public class BananaEncoder
extends java.lang.Object

An encoder for the Banana wire protocol.


Constructor Summary
BananaEncoder(java.io.OutputStream out)
          Create a new BananaEncoder.
 
Method Summary
protected  void int2b128(java.math.BigInteger i)
          Write a positive big integer to the stream in b128 format.
protected  void int2b128(int i)
          Write a positive integer to the stream in b128 format.
protected  void write(java.math.BigInteger i)
          Write a big integer to the stream.
protected  void write(ByteString s)
          Write a ByteString to the stream.
protected  void write(java.lang.Double f)
          Write a Double to the stream.
protected  void write(java.lang.Integer i)
          Write an integer to the stream.
protected  void write(java.lang.Object o)
          Write one of the supported object to the stream.
protected  void write(java.lang.Object[] l)
          Write a list of objects to the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BananaEncoder

public BananaEncoder(java.io.OutputStream out)
Create a new BananaEncoder.
Method Detail

int2b128

protected void int2b128(int i)
                 throws java.io.IOException
Write a positive integer to the stream in b128 format.

int2b128

protected void int2b128(java.math.BigInteger i)
                 throws java.io.IOException
Write a positive big integer to the stream in b128 format.

write

protected void write(java.lang.Object o)
              throws java.io.IOException
Write one of the supported object to the stream. The supported types are Integer, Double, ByteString, BigInteger, or an Object[] or list composed of supported types.

write

protected void write(java.math.BigInteger i)
              throws java.io.IOException
Write a big integer to the stream.

write

protected void write(java.lang.Integer i)
              throws java.io.IOException
Write an integer to the stream.

write

protected void write(java.lang.Double f)
              throws java.io.IOException
Write a Double to the stream.

write

protected void write(ByteString s)
              throws java.io.IOException
Write a ByteString to the stream.

write

protected void write(java.lang.Object[] l)
              throws java.io.IOException
Write a list of objects to the stream.