org.osesb.utilities.language
Class BlockUtilities

java.lang.Object
  extended by org.osesb.utilities.language.BlockUtilities

public class BlockUtilities
extends java.lang.Object

This Class contains utilities for handling byte[].

Since:
Version .9

Constructor Summary
BlockUtilities()
           
 
Method Summary
static void copyBlock(byte[] src, byte[] dst)
           
static void copyBlock(byte[] src, int srcOff, byte[] dst, int dstOff, int len)
           
static boolean equalsBlock(byte[] a, byte[] b)
           
static boolean equalsBlock(byte[] a, int aOff, byte[] b, int bOff, int len)
           
static void fillBlock(byte[] block, byte b)
           
static void fillBlock(byte[] block, int blockOff, byte b, int len)
           
static void main(java.lang.String[] args)
          main(): For testing and sandboxing.
static void randomBlock(byte[] block)
           
static void randomBlock(byte[] block, int off, int len)
           
static void spreadIntsToBytes(int[] inInts, int inOff, byte[] outBytes, int outOff, int intLen)
           
static void spreadIntsToBytesLittle(int[] inInts, int inOff, byte[] outBytes, int outOff, int intLen)
           
static void spreadShortsToBytes(int[] inShorts, int inOff, byte[] outBytes, int outOff, int shortLen)
           
static void spreadShortsToBytesLittle(int[] inShorts, int inOff, byte[] outBytes, int outOff, int shortLen)
           
static void squashBytesToInts(byte[] inBytes, int inOff, int[] outInts, int outOff, int intLen)
           
static void squashBytesToIntsLittle(byte[] inBytes, int inOff, int[] outInts, int outOff, int intLen)
           
static void squashBytesToShorts(byte[] inBytes, int inOff, int[] outShorts, int outOff, int shortLen)
           
static void squashBytesToShortsLittle(byte[] inBytes, int inOff, int[] outShorts, int outOff, int shortLen)
           
static java.lang.String toStringBlock(byte[] block)
           
static java.lang.String toStringBlock(byte[] block, int off, int len)
           
static void xorBlock(byte[] a, byte[] b, byte[] dst)
           
static void xorBlock(byte[] a, int aOff, byte[] b, int bOff, byte[] dst, int dstOff, int len)
           
static void zeroBlock(byte[] block)
           
static void zeroBlock(byte[] block, int off, int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockUtilities

public BlockUtilities()
Method Detail

zeroBlock

public static void zeroBlock(byte[] block,
                             int off,
                             int len)

zeroBlock

public static void zeroBlock(byte[] block)

randomBlock

public static void randomBlock(byte[] block,
                               int off,
                               int len)

randomBlock

public static void randomBlock(byte[] block)

xorBlock

public static void xorBlock(byte[] a,
                            int aOff,
                            byte[] b,
                            int bOff,
                            byte[] dst,
                            int dstOff,
                            int len)

xorBlock

public static void xorBlock(byte[] a,
                            byte[] b,
                            byte[] dst)

copyBlock

public static void copyBlock(byte[] src,
                             int srcOff,
                             byte[] dst,
                             int dstOff,
                             int len)

copyBlock

public static void copyBlock(byte[] src,
                             byte[] dst)

equalsBlock

public static boolean equalsBlock(byte[] a,
                                  int aOff,
                                  byte[] b,
                                  int bOff,
                                  int len)

equalsBlock

public static boolean equalsBlock(byte[] a,
                                  byte[] b)

fillBlock

public static void fillBlock(byte[] block,
                             int blockOff,
                             byte b,
                             int len)

fillBlock

public static void fillBlock(byte[] block,
                             byte b)

squashBytesToInts

public static void squashBytesToInts(byte[] inBytes,
                                     int inOff,
                                     int[] outInts,
                                     int outOff,
                                     int intLen)

spreadIntsToBytes

public static void spreadIntsToBytes(int[] inInts,
                                     int inOff,
                                     byte[] outBytes,
                                     int outOff,
                                     int intLen)

squashBytesToIntsLittle

public static void squashBytesToIntsLittle(byte[] inBytes,
                                           int inOff,
                                           int[] outInts,
                                           int outOff,
                                           int intLen)

spreadIntsToBytesLittle

public static void spreadIntsToBytesLittle(int[] inInts,
                                           int inOff,
                                           byte[] outBytes,
                                           int outOff,
                                           int intLen)

squashBytesToShorts

public static void squashBytesToShorts(byte[] inBytes,
                                       int inOff,
                                       int[] outShorts,
                                       int outOff,
                                       int shortLen)

spreadShortsToBytes

public static void spreadShortsToBytes(int[] inShorts,
                                       int inOff,
                                       byte[] outBytes,
                                       int outOff,
                                       int shortLen)

squashBytesToShortsLittle

public static void squashBytesToShortsLittle(byte[] inBytes,
                                             int inOff,
                                             int[] outShorts,
                                             int outOff,
                                             int shortLen)

spreadShortsToBytesLittle

public static void spreadShortsToBytesLittle(int[] inShorts,
                                             int inOff,
                                             byte[] outBytes,
                                             int outOff,
                                             int shortLen)

toStringBlock

public static java.lang.String toStringBlock(byte[] block,
                                             int off,
                                             int len)

toStringBlock

public static java.lang.String toStringBlock(byte[] block)

main

public static void main(java.lang.String[] args)
main(): For testing and sandboxing.

Parameters:
args - commandline arguments