|
MAM API (developer's version) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMAMUtil
public final class MAMUtil
Miscellaneous utilities for MAMCodec.
Constructor Summary | |
---|---|
private |
MAMUtil()
No instantiation for the library class |
Method Summary | |
---|---|
static void |
callCodec(Codec codec,
InputStream in,
OutputStream out)
|
static String |
callCodec(Codec codec,
String input)
String coding function that can be used for test purposes. |
static byte[] |
getDefaultByteOrder()
Defaults for move-to-front transformation. |
static byte[] |
read(InputStream in)
|
static int |
read(InputStream in,
byte[] buffer)
Read as much as possible until the end of stream. |
static int |
readInt(InputStream in)
|
static byte[] |
setChars()
|
static int[] |
setDefaultDistribution()
|
static int |
setFrequencyDistribution(int[] dist,
int[] freqs)
|
static int[] |
setInitialCounts(int[] freq,
int[] symbols)
The function must be called before the encoding. |
static byte[] |
toBinaryBytes(byte bits)
Converts one byte to a sequence of eight bytes of zeros and ones corresponding the bit sequence. |
static byte[] |
toBytes(int number)
Converts a 32 bit int into a array of four bytes. |
static int |
toInt(byte[] b)
Converts four bytes to a 32 bit int. |
static int |
toInt(byte[] b,
int offset)
Converts four bytes to a 32 bit int. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private MAMUtil()
Method Detail |
---|
public static int[] setDefaultDistribution()
public static byte[] setChars()
public static byte[] getDefaultByteOrder()
public static int setFrequencyDistribution(int[] dist, int[] freqs)
public static String callCodec(Codec codec, String input)
public static void callCodec(Codec codec, InputStream in, OutputStream out)
public static int read(InputStream in, byte[] buffer) throws IOException
IOException
public static byte[] read(InputStream in) throws IOException
IOException
public static int readInt(InputStream in) throws IOException
IOException
public static byte[] toBytes(int number)
public static int toInt(byte[] b)
public static int toInt(byte[] b, int offset)
public static byte[] toBinaryBytes(byte bits)
public static int[] setInitialCounts(int[] freq, int[] symbols)
|
MAM API (developer's version) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |