net.fractalkiss.util
Class Util

java.lang.Object
  |
  +--net.fractalkiss.util.Util
Direct Known Subclasses:
Fragger, FrameCube, FramePlane

public class Util
extends java.lang.Object

Base Utility class


Constructor Summary
Util()
           
 
Method Summary
static char[] and(char[] sb, char[] xor)
           
static void fill02(char[][] plane, int x, int y)
          fills 2D char array with zeros
static void fill03(char[][][] cube, int x, int y, int z)
          fills 3D char array with zeros
static char[] nand(char[] sb, char[] xor)
          performs NAND operation (NotAnd), it's the commutative opposite of andNot, but sounds and writes shorter.
static char[] or(char[] sb, char[] xor)
           
static void writeBytes(java.io.OutputStream ou, char[] level)
          Makes sure chars are written without encoding
static void writePlane(char[][] plane, java.lang.String name, int res)
          writes plane to name file
static char[] xor(char[] a, char[] b)
          per byte XOR of two char arrays
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

nand

public static char[] nand(char[] sb,
                          char[] xor)
performs NAND operation (NotAnd), it's the commutative opposite of andNot, but sounds and writes shorter. The thing of notice, however is that NAND is not commutative, xor mask is negated and then compared to presentation
Parameters:
sb - presentation
xor - xor mask
Returns:
nand result, essentially fragmented sb

and

public static char[] and(char[] sb,
                         char[] xor)

or

public static char[] or(char[] sb,
                        char[] xor)

xor

public static char[] xor(char[] a,
                         char[] b)
per byte XOR of two char arrays
Parameters:
a - array 1
b - array 2
Returns:
xor result

fill02

public static void fill02(char[][] plane,
                          int x,
                          int y)
fills 2D char array with zeros
Parameters:
plane - char array to fill
x - size of first index
y - size of second index

fill03

public static void fill03(char[][][] cube,
                          int x,
                          int y,
                          int z)
fills 3D char array with zeros
Parameters:
cube - 3D char array
x - size of first index
y - size of second index
z - size of third index

writeBytes

public static void writeBytes(java.io.OutputStream ou,
                              char[] level)
Makes sure chars are written without encoding
Parameters:
ou - outputstream
level - fragmentation level

writePlane

public static void writePlane(char[][] plane,
                              java.lang.String name,
                              int res)
writes plane to name file
Parameters:
plane - 2D char array
name - file name
res - size of cube sides