net.sf.jbaobab.helper
Class ByteHelper

java.lang.Object
  extended by net.sf.jbaobab.helper.ByteHelper

public final class ByteHelper
extends Object

A helper class for manipulating byte arrays and ByteBuffer instances.

Author:
Oakyoon Cha

Method Summary
static char asciiChar(byte source)
           
static String asciiString(ByteBuffer source)
           
static String asciiString(ByteBuffer source, int offset, int length)
           
static byte[] byteArray(byte[] source)
           
static byte[] byteArray(byte[] source, int offset, int length)
           
static byte[] byteArray(ByteBuffer source)
           
static byte[] byteArray(ByteBuffer source, int offset, int length)
           
static ByteBuffer byteBuffer(byte[] source)
           
static ByteBuffer byteBuffer(byte[] source, int offset, int length)
           
static ByteBuffer byteBuffer(ByteBuffer source)
           
static ByteBuffer byteBuffer(ByteBuffer source, int offset, int length)
           
static int byteScan(byte[] source, byte[] search)
           
static int byteScan(byte[] source, int from, int to, byte[] search)
           
static int byteScan(ByteBuffer source, byte[] search)
           
static int byteScan(ByteBuffer source, int from, int to, byte[] search)
           
static String hexString(byte source)
           
static String hexString(ByteBuffer source)
           
static String hexString(ByteBuffer source, int offset, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

byteArray

public static byte[] byteArray(ByteBuffer source,
                               int offset,
                               int length)

byteArray

public static byte[] byteArray(ByteBuffer source)

byteArray

public static byte[] byteArray(byte[] source,
                               int offset,
                               int length)

byteArray

public static byte[] byteArray(byte[] source)

byteBuffer

public static ByteBuffer byteBuffer(ByteBuffer source,
                                    int offset,
                                    int length)

byteBuffer

public static ByteBuffer byteBuffer(ByteBuffer source)

byteBuffer

public static ByteBuffer byteBuffer(byte[] source,
                                    int offset,
                                    int length)

byteBuffer

public static ByteBuffer byteBuffer(byte[] source)

byteScan

public static int byteScan(ByteBuffer source,
                           int from,
                           int to,
                           byte[] search)

byteScan

public static int byteScan(ByteBuffer source,
                           byte[] search)

byteScan

public static int byteScan(byte[] source,
                           int from,
                           int to,
                           byte[] search)

byteScan

public static int byteScan(byte[] source,
                           byte[] search)

hexString

public static String hexString(byte source)

hexString

public static String hexString(ByteBuffer source,
                               int offset,
                               int length)

hexString

public static String hexString(ByteBuffer source)

asciiChar

public static char asciiChar(byte source)

asciiString

public static String asciiString(ByteBuffer source,
                                 int offset,
                                 int length)

asciiString

public static String asciiString(ByteBuffer source)