|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.prosyst.util.encode.Axill
public class Axill
Implements useful methods.
| Field Summary | |
|---|---|
static boolean |
debug
|
| Constructor Summary | |
|---|---|
Axill()
|
|
| Method Summary | |
|---|---|
static byte[] |
add(byte[] array,
byte[] toAdd,
int flag,
int type)
Returns byte array local with the properties: |
static void |
add(java.io.OutputStream baos,
byte[] toAdd,
int type)
Adds to array toAdd from flag position with type bytes length in beginning |
static boolean |
equals(byte[] temp1,
byte[] temp2)
Compares if two byte arrays are equals - e.g. |
static boolean |
equals(int[] temp1,
int[] temp2)
Compares if two integer arrays are equals - e.g. |
static byte[] |
extract(byte[] array,
int flag,
int type)
Opposite to set |
static byte[] |
get(java.io.InputStream bais,
int type)
Gets array from stream with type bytes length in beginning |
static byte[] |
getN(byte[] array,
int n,
int type)
Gets N-th element from array which can be result of M times making of add method with same type (M>=N) |
static java.lang.String |
parseString(java.lang.String str,
int blocks)
Parses string in blocks of 4 chars in "blocks" blocks per line |
static void |
print(java.lang.String comment,
byte[] ba)
Dumps the byte array on the system console, prepending it with the given comment, if debug is enabled. |
static void |
print(java.lang.String comment,
int[] ia)
Dumps the integer array on the system console, prepending it with the given comment, if debug is enabled. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean debug
| Constructor Detail |
|---|
public Axill()
| Method Detail |
|---|
public static byte[] add(byte[] array,
byte[] toAdd,
int flag,
int type)
for i = 0 to flag - 1 : local[i] = array[i] next |type| elements are toAdd.length next toAdd.elements are copy of toAdd next array.length - flag elements are then last elements from array
array - array to which we add elementstoAdd - array which we addflag - index from which we add toAddtype - number of bytes which keeps toAdd length (must be 0,1 or 2)
java.lang.IllegalArgumentException - if wrong Axill type is detected or the
start index (flag parameter) exceeds the array length.
public static byte[] extract(byte[] array,
int flag,
int type)
array - array from which we extract partflag - index from which be begin extractingtype - numbers of bytes which keep length
java.lang.IllegalArgumentException - if the number of elements to extract is
bigger, than the array length, or wrong Axill type is detected
public static byte[] getN(byte[] array,
int n,
int type)
array - array from witch we takes elementn - number of the element we want to gettype - number of bytes keeping elements length
java.lang.IllegalArgumentException - if wrong Axill type is detected
public static void add(java.io.OutputStream baos,
byte[] toAdd,
int type)
baos - stream we append totoAdd - byte[] we appendtype - number of bytes for length
java.lang.IllegalArgumentException - when I/O operation fails
public static byte[] get(java.io.InputStream bais,
int type)
bais - stream we read fromtype - number of bytes represented length
java.lang.IllegalArgumentException - on I/O error
public static boolean equals(byte[] temp1,
byte[] temp2)
temp1 - first array for comparing, cannot be nulltemp2 - second array for comparing , cannot be null
true if the two arrays are equal
public static boolean equals(int[] temp1,
int[] temp2)
temp1 - first array for comparing, cannot be nulltemp2 - second array for comparing , cannot be null
true if the two arrays are equal
public static java.lang.String parseString(java.lang.String str,
int blocks)
str - the stringblocks - the number of block per line
public static void print(java.lang.String comment,
byte[] ba)
comment - the comment, that is prepended before the byte array databa - the byte array which values are printed separated by space
public static void print(java.lang.String comment,
int[] ia)
comment - the comment, that is prepended before the byte array dataia - the byte array which values are printed separated by space
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||