werkzeug
Class Util
java.lang.Object
werkzeug.Util
public class Util
- extends java.lang.Object
|
Constructor Summary |
Util()
|
|
Method Summary |
static float[] |
addToArray(float[] theArray,
float theNewItem)
|
static long |
bytesToLong(byte[] b)
|
static boolean |
contains(java.lang.String theString,
java.lang.CharSequence theContainedString)
|
static int[] |
convertByteArrayToIntArray(byte[] myByteArray,
int bytesPerInt,
boolean signed)
|
static byte[] |
convertIntArrayToByteArray(int[] myIntArray,
int bytesPerInt)
|
static byte[] |
convertIntToByteArray(int value,
int numberOfBytes)
|
static void |
createPath(java.lang.String filename)
|
static int |
day()
|
static float |
decimalPlace(float theValue,
int theDecimalPlaces)
|
static boolean |
dialog(java.lang.String theMessage)
|
static java.lang.String |
formatNumber(int theNumber,
int theNumberOfDigits)
|
static byte |
fromChar(char c)
|
static byte |
fromUnsignedInt(int value)
|
static java.util.Vector<java.io.File> |
getFilesInDirectory(java.io.File theFolderPath)
|
static java.util.Vector<java.lang.String> |
getFilesInDirectory(java.lang.String theFolderPath)
|
static java.util.Vector<java.lang.String> |
getFilesInDirectory(java.lang.String theFolderPath,
boolean theFullPath)
|
static java.util.Vector<java.lang.String> |
getFilesInDirectory(java.lang.String theFolderPath,
java.lang.String[] theExceptions)
|
static java.util.Vector<java.lang.String> |
getFilesInDirectory(java.lang.String theFolderPath,
java.lang.String[] theExceptions,
boolean theFullPath)
|
static java.io.InputStream |
getInputStream(java.lang.String thePath)
|
static java.io.InputStream |
getInputStreamFromURL(java.lang.String theFilePath)
|
static java.io.OutputStream |
getOutputStream(java.lang.String theFilePath)
|
static java.io.OutputStream |
getOutputStreamFromURL(java.lang.String theFilePath)
|
static java.io.PrintStream |
getSnitchablePrintStream(java.lang.String theInfo,
java.awt.TextArea theTextOutput)
|
static long |
getUnsignedByte(byte b)
|
static int |
hour()
|
static void |
info(java.lang.String theMessage)
|
static byte[] |
loadBytes(java.io.InputStream theInputStream)
|
static byte[] |
loadBytes(java.lang.String theFilePath)
|
static java.util.Vector<Vector3f> |
loadPoints(java.lang.String theFileName)
|
static void |
loadPoints(java.lang.String theFileName,
java.util.Vector<Vector3f> thePoints)
|
static java.lang.String |
loadString(java.io.InputStream theInputStream)
|
static java.util.Vector<java.lang.String> |
loadStrings(java.io.InputStream theInputStream)
|
static java.util.Vector<java.lang.String> |
loadStrings(java.lang.String theFilePath)
|
static void |
longToBytes(long l,
byte[] b)
|
static int[] |
mergeArrays(int[] theArrayA,
int[] theArrayB)
|
static int |
minute()
|
static int |
month()
|
static java.lang.String |
now()
|
static void |
playNote(int theChannel,
int theKey,
int theVelocity)
|
static void |
playWarning()
|
static void |
printArray(byte[] array)
|
static void |
printArray(double[] array)
|
static void |
printArray(float[] array)
|
static void |
printArray(int[] array)
|
static void |
printArray(int[][] array)
|
static void |
printArray(java.lang.Object[] array)
|
static float |
random(float theStart,
float theEnd)
|
static int |
random(int theRange)
|
static int |
random(int theStart,
int theEnd)
|
static boolean |
randomEvent(float theChance,
float theRange)
|
static java.io.PrintStream |
routeSystemErrToFile(java.lang.String theErrFilename)
|
static java.io.PrintStream |
routeSystemOutToFile(java.lang.String theOutFilename)
|
static void |
saveBytes(java.lang.String filename,
byte[] byteData)
|
static void |
saveInt16bit(java.lang.String filename,
int[] intData)
|
static void |
savePoints(java.lang.String theFilename,
java.util.Vector<Vector3f> thePoints)
|
static void |
saveString(java.io.OutputStream output,
java.lang.String theString)
|
static void |
saveString(java.lang.String theFilePath,
java.lang.String theString)
|
static void |
saveStrings(java.io.OutputStream theOutput,
java.lang.String[] theStrings)
|
static void |
saveStrings(java.io.OutputStream theOutput,
java.util.Vector<java.lang.String> theStrings)
|
static void |
saveStrings(java.lang.String theFilePath,
java.lang.String[] theStrings)
|
static void |
saveStrings(java.lang.String theFilePath,
java.util.Vector<java.lang.String> theStrings)
|
static int |
second()
|
static void |
snitchSystemOutput()
|
static void |
snitchSystemOutput(java.awt.Window theFrame)
|
static void |
stopSynth()
|
static boolean[] |
toArray(java.util.Vector<java.lang.Boolean> theData)
|
static byte[] |
toArray(java.util.Vector<java.lang.Byte> theData)
|
static char[] |
toArray(java.util.Vector<java.lang.Character> theData)
|
static float[] |
toArray(java.util.Vector<java.lang.Float> theData)
|
static int[] |
toArray(java.util.Vector<java.lang.Integer> theData)
|
static java.lang.String |
toBitString(byte value)
|
static char |
toChar(byte value)
|
static java.lang.String |
today()
|
static float[] |
toFloatArray(java.util.Vector<Vector3f> theData)
|
static int |
toUnsignedInt(byte value)
|
static java.lang.String |
wrapText(java.lang.String string,
int theWrapLength)
|
static java.lang.String |
wrapText(java.lang.String theString,
java.lang.String theLineSeparator,
int theWrapLength)
|
static int |
year()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Util
public Util()
formatNumber
public static java.lang.String formatNumber(int theNumber,
int theNumberOfDigits)
decimalPlace
public static float decimalPlace(float theValue,
int theDecimalPlaces)
random
public static int random(int theRange)
randomEvent
public static boolean randomEvent(float theChance,
float theRange)
random
public static int random(int theStart,
int theEnd)
random
public static float random(float theStart,
float theEnd)
printArray
public static void printArray(int[] array)
printArray
public static void printArray(int[][] array)
printArray
public static void printArray(byte[] array)
printArray
public static void printArray(float[] array)
printArray
public static void printArray(double[] array)
printArray
public static void printArray(java.lang.Object[] array)
addToArray
public static float[] addToArray(float[] theArray,
float theNewItem)
mergeArrays
public static int[] mergeArrays(int[] theArrayA,
int[] theArrayB)
convertIntArrayToByteArray
public static byte[] convertIntArrayToByteArray(int[] myIntArray,
int bytesPerInt)
convertByteArrayToIntArray
public static int[] convertByteArrayToIntArray(byte[] myByteArray,
int bytesPerInt,
boolean signed)
longToBytes
public static void longToBytes(long l,
byte[] b)
bytesToLong
public static long bytesToLong(byte[] b)
getUnsignedByte
public static long getUnsignedByte(byte b)
convertIntToByteArray
public static byte[] convertIntToByteArray(int value,
int numberOfBytes)
fromUnsignedInt
public static byte fromUnsignedInt(int value)
fromChar
public static byte fromChar(char c)
toUnsignedInt
public static int toUnsignedInt(byte value)
toChar
public static char toChar(byte value)
toBitString
public static java.lang.String toBitString(byte value)
second
public static int second()
minute
public static int minute()
hour
public static int hour()
day
public static int day()
month
public static int month()
year
public static int year()
now
public static java.lang.String now()
today
public static java.lang.String today()
getInputStreamFromURL
public static java.io.InputStream getInputStreamFromURL(java.lang.String theFilePath)
getOutputStreamFromURL
public static java.io.OutputStream getOutputStreamFromURL(java.lang.String theFilePath)
getInputStream
public static java.io.InputStream getInputStream(java.lang.String thePath)
getOutputStream
public static java.io.OutputStream getOutputStream(java.lang.String theFilePath)
saveBytes
public static void saveBytes(java.lang.String filename,
byte[] byteData)
loadBytes
public static byte[] loadBytes(java.lang.String theFilePath)
loadBytes
public static byte[] loadBytes(java.io.InputStream theInputStream)
saveInt16bit
public static void saveInt16bit(java.lang.String filename,
int[] intData)
saveString
public static void saveString(java.lang.String theFilePath,
java.lang.String theString)
saveString
public static void saveString(java.io.OutputStream output,
java.lang.String theString)
saveStrings
public static void saveStrings(java.lang.String theFilePath,
java.lang.String[] theStrings)
saveStrings
public static void saveStrings(java.io.OutputStream theOutput,
java.lang.String[] theStrings)
saveStrings
public static void saveStrings(java.io.OutputStream theOutput,
java.util.Vector<java.lang.String> theStrings)
saveStrings
public static void saveStrings(java.lang.String theFilePath,
java.util.Vector<java.lang.String> theStrings)
loadStrings
public static java.util.Vector<java.lang.String> loadStrings(java.lang.String theFilePath)
loadStrings
public static java.util.Vector<java.lang.String> loadStrings(java.io.InputStream theInputStream)
loadString
public static java.lang.String loadString(java.io.InputStream theInputStream)
createPath
public static void createPath(java.lang.String filename)
routeSystemOutToFile
public static java.io.PrintStream routeSystemOutToFile(java.lang.String theOutFilename)
routeSystemErrToFile
public static java.io.PrintStream routeSystemErrToFile(java.lang.String theErrFilename)
contains
public static boolean contains(java.lang.String theString,
java.lang.CharSequence theContainedString)
wrapText
public static java.lang.String wrapText(java.lang.String string,
int theWrapLength)
wrapText
public static java.lang.String wrapText(java.lang.String theString,
java.lang.String theLineSeparator,
int theWrapLength)
snitchSystemOutput
public static void snitchSystemOutput(java.awt.Window theFrame)
snitchSystemOutput
public static void snitchSystemOutput()
getSnitchablePrintStream
public static java.io.PrintStream getSnitchablePrintStream(java.lang.String theInfo,
java.awt.TextArea theTextOutput)
getFilesInDirectory
public static java.util.Vector<java.lang.String> getFilesInDirectory(java.lang.String theFolderPath)
getFilesInDirectory
public static java.util.Vector<java.lang.String> getFilesInDirectory(java.lang.String theFolderPath,
java.lang.String[] theExceptions)
getFilesInDirectory
public static java.util.Vector<java.lang.String> getFilesInDirectory(java.lang.String theFolderPath,
boolean theFullPath)
getFilesInDirectory
public static java.util.Vector<java.lang.String> getFilesInDirectory(java.lang.String theFolderPath,
java.lang.String[] theExceptions,
boolean theFullPath)
getFilesInDirectory
public static java.util.Vector<java.io.File> getFilesInDirectory(java.io.File theFolderPath)
playWarning
public static final void playWarning()
playNote
public static final void playNote(int theChannel,
int theKey,
int theVelocity)
stopSynth
public static final void stopSynth()
info
public static void info(java.lang.String theMessage)
dialog
public static boolean dialog(java.lang.String theMessage)
toArray
public static final int[] toArray(java.util.Vector<java.lang.Integer> theData)
toArray
public static final float[] toArray(java.util.Vector<java.lang.Float> theData)
toArray
public static final boolean[] toArray(java.util.Vector<java.lang.Boolean> theData)
toArray
public static final char[] toArray(java.util.Vector<java.lang.Character> theData)
toArray
public static final byte[] toArray(java.util.Vector<java.lang.Byte> theData)
toFloatArray
public static final float[] toFloatArray(java.util.Vector<Vector3f> theData)
loadPoints
public static java.util.Vector<Vector3f> loadPoints(java.lang.String theFileName)
loadPoints
public static void loadPoints(java.lang.String theFileName,
java.util.Vector<Vector3f> thePoints)
savePoints
public static void savePoints(java.lang.String theFilename,
java.util.Vector<Vector3f> thePoints)
processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009