org.klomp.snark.bencode
Class BEncoder

java.lang.Object
  extended by org.klomp.snark.bencode.BEncoder

public class BEncoder
extends java.lang.Object


Constructor Summary
BEncoder()
           
 
Method Summary
static byte[] bencode(byte[] bs)
           
static void bencode(byte[] bs, java.io.OutputStream out)
           
static byte[] bencode(java.util.List l)
           
static void bencode(java.util.List l, java.io.OutputStream out)
           
static byte[] bencode(java.util.Map m)
           
static void bencode(java.util.Map m, java.io.OutputStream out)
           
static byte[] bencode(java.lang.Number n)
           
static void bencode(java.lang.Number n, java.io.OutputStream out)
           
static byte[] bencode(java.lang.Object o)
           
static void bencode(java.lang.Object o, java.io.OutputStream out)
           
static byte[] bencode(java.lang.String s)
           
static void bencode(java.lang.String s, java.io.OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BEncoder

public BEncoder()
Method Detail

bencode

public static byte[] bencode(java.lang.Object o)
                      throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

bencode

public static void bencode(java.lang.Object o,
                           java.io.OutputStream out)
                    throws java.io.IOException,
                           java.lang.IllegalArgumentException
Throws:
java.io.IOException
java.lang.IllegalArgumentException

bencode

public static byte[] bencode(java.lang.String s)

bencode

public static void bencode(java.lang.String s,
                           java.io.OutputStream out)
                    throws java.io.IOException
Throws:
java.io.IOException

bencode

public static byte[] bencode(java.lang.Number n)

bencode

public static void bencode(java.lang.Number n,
                           java.io.OutputStream out)
                    throws java.io.IOException
Throws:
java.io.IOException

bencode

public static byte[] bencode(java.util.List l)

bencode

public static void bencode(java.util.List l,
                           java.io.OutputStream out)
                    throws java.io.IOException
Throws:
java.io.IOException

bencode

public static byte[] bencode(byte[] bs)

bencode

public static void bencode(byte[] bs,
                           java.io.OutputStream out)
                    throws java.io.IOException
Throws:
java.io.IOException

bencode

public static byte[] bencode(java.util.Map m)

bencode

public static void bencode(java.util.Map m,
                           java.io.OutputStream out)
                    throws java.io.IOException
Throws:
java.io.IOException