com.wizzardo.tools.io
Class BytesTools

java.lang.Object
  extended by com.wizzardo.tools.io.BytesTools

public class BytesTools
extends java.lang.Object


Constructor Summary
BytesTools()
           
 
Method Summary
static byte[] toBytes(int i)
           
static void toBytes(int i, java.io.OutputStream out)
           
static byte[] toBytes(long l)
           
static byte[] toBytes(long l, byte[] bytes, int offset, int bytesCount)
           
static byte[] toBytes(long l, int bytesCount)
           
static void toBytes(long l, java.io.OutputStream out)
           
static void toBytes(long l, java.io.OutputStream out, int bytesCount)
           
static int toInt(byte[] b)
           
static int toInt(byte[] b, int offset)
           
static long toLong(byte[] b)
           
static long toLong(byte[] b, int offset)
           
static long toNumber(byte[] b, int offset, int bytesCount)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BytesTools

public BytesTools()
Method Detail

toBytes

public static byte[] toBytes(long l)

toBytes

public static void toBytes(long l,
                           java.io.OutputStream out)
                    throws java.io.IOException
Throws:
java.io.IOException

toLong

public static long toLong(byte[] b)

toLong

public static long toLong(byte[] b,
                          int offset)

toBytes

public static byte[] toBytes(int i)

toBytes

public static void toBytes(int i,
                           java.io.OutputStream out)
                    throws java.io.IOException
Throws:
java.io.IOException

toInt

public static int toInt(byte[] b)

toInt

public static int toInt(byte[] b,
                        int offset)

toNumber

public static long toNumber(byte[] b,
                            int offset,
                            int bytesCount)

toBytes

public static void toBytes(long l,
                           java.io.OutputStream out,
                           int bytesCount)
                    throws java.io.IOException
Throws:
java.io.IOException

toBytes

public static byte[] toBytes(long l,
                             int bytesCount)

toBytes

public static byte[] toBytes(long l,
                             byte[] bytes,
                             int offset,
                             int bytesCount)