|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.galagosearch.tupleflow.Utility
public class Utility
Lots of static methods here that have broad use.
| Constructor Summary | |
|---|---|
Utility()
|
|
| Method Summary | |
|---|---|
static void |
calculateMessageDigest(java.io.File file,
java.security.MessageDigest instance)
|
static java.lang.String |
caps(java.lang.String input)
|
static int |
compare(byte[] one,
byte[] two)
|
static int |
compare(double one,
double two)
|
static int |
compare(float one,
float two)
|
static int |
compare(int one,
int two)
|
static int |
compare(long one,
long two)
|
static int |
compare(java.lang.String one,
java.lang.String two)
|
static void |
copyFileToStream(java.io.File file,
java.io.OutputStream stream)
Copies the data from file into the stream. |
static void |
copyStreamToFile(java.io.InputStream stream,
java.io.File file)
Copies the data from the InputStream to a file, then closes both when finished. |
static java.io.File |
createTemporary()
|
static java.io.File |
createTemporary(long requiredSpace)
|
static void |
deleteDirectory(java.io.File directory)
|
static java.lang.String |
escape(java.lang.String raw)
|
static int |
getFreePort()
Finds a free port to listen on. |
static long |
getFreeSpace(java.lang.String pathname)
|
static Step |
getSorter(Order sortOrder)
Builds a simple Sorter step that can be added to a TupleFlow stage. |
static long |
getUnixFreeSpace(java.lang.String pathname)
|
static int |
hash(byte b)
|
static int |
hash(byte[] b)
|
static int |
hash(double d)
|
static int |
hash(float f)
|
static int |
hash(int i)
|
static int |
hash(long l)
|
static int |
hash(java.lang.String s)
|
static boolean |
isInteger(java.lang.String s)
|
static java.lang.String |
join(java.lang.String[] args)
|
static java.lang.String |
join(java.lang.String[] args,
java.lang.String delimiter)
Returns a string containing all the elements of args, space delimited. |
static byte[] |
makeBytes(java.lang.String word)
|
static java.lang.String |
makeString(byte[] word)
|
static java.lang.String |
plural(java.lang.String input)
|
static java.util.HashSet<java.lang.String> |
readFileToStringSet(java.io.File file)
|
static java.lang.String |
strip(java.lang.String source,
java.lang.String suffix)
|
static java.lang.String[] |
subarray(java.lang.String[] master,
int index)
For an array master, returns an array containing the last master.length-index elements. |
static java.lang.String |
wrap(java.lang.String t)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utility()
| Method Detail |
|---|
public static Step getSorter(Order sortOrder)
sortOrder - An order object representing how and what to sort.
public static int getFreePort()
throws java.io.IOException
java.io.IOExceptionpublic static boolean isInteger(java.lang.String s)
public static java.lang.String wrap(java.lang.String t)
public static java.lang.String escape(java.lang.String raw)
public static java.lang.String strip(java.lang.String source,
java.lang.String suffix)
public static java.lang.String makeString(byte[] word)
public static byte[] makeBytes(java.lang.String word)
public static java.lang.String[] subarray(java.lang.String[] master,
int index)
public static java.lang.String join(java.lang.String[] args,
java.lang.String delimiter)
public static java.lang.String join(java.lang.String[] args)
public static java.lang.String caps(java.lang.String input)
public static java.lang.String plural(java.lang.String input)
public static int compare(int one,
int two)
public static int compare(long one,
long two)
public static int compare(double one,
double two)
public static int compare(float one,
float two)
public static int compare(java.lang.String one,
java.lang.String two)
public static int compare(byte[] one,
byte[] two)
public static int hash(byte b)
public static int hash(int i)
public static int hash(long l)
public static int hash(double d)
public static int hash(float f)
public static int hash(java.lang.String s)
public static int hash(byte[] b)
public static void deleteDirectory(java.io.File directory)
throws java.io.IOException
java.io.IOException
public static java.io.File createTemporary()
throws java.io.IOException
java.io.IOException
public static long getUnixFreeSpace(java.lang.String pathname)
throws java.io.IOException
java.io.IOException
public static long getFreeSpace(java.lang.String pathname)
throws java.io.IOException
java.io.IOException
public static java.io.File createTemporary(long requiredSpace)
throws java.io.IOException
java.io.IOException
public static void copyFileToStream(java.io.File file,
java.io.OutputStream stream)
throws java.io.IOException
file - stream -
java.io.IOException
public static void copyStreamToFile(java.io.InputStream stream,
java.io.File file)
throws java.io.IOException
stream - file -
java.io.IOException
public static void calculateMessageDigest(java.io.File file,
java.security.MessageDigest instance)
throws java.io.IOException
java.io.IOException
public static java.util.HashSet<java.lang.String> readFileToStringSet(java.io.File file)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||