|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.myJava.util.Util
public abstract class Util
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static java.lang.String |
adjustSize(java.lang.String s,
int size,
char completion,
boolean dockRight)
Adjust the String's size to the requested size. |
static byte[] |
base16Decode(java.lang.String input)
Decode the base 16 representation passed as argument and return the corresponding byte[] |
static java.lang.String |
base16Encode(byte[] data)
Return a base 16 String representation of the byte[] passed as argument |
static byte[] |
base64Decode(java.lang.String data)
Decode the base 64 representation passed as argument and return the corresponding byte[] |
static java.lang.String |
base64Encode(byte[] data)
Return a base 64 String representation of the byte[] passed as argument |
static java.lang.Short |
buildOptimizedShort(short s)
|
static int |
count(java.lang.String chaine,
int startIndex,
char c)
|
static int |
count(java.lang.String chaine,
java.lang.String str)
|
static java.lang.String |
duplicate(java.lang.String s,
int nb)
Duplicates the first argument |
static java.lang.String |
getClassName(java.lang.String path)
Extract the classe's short name |
static java.lang.String |
getContentList(java.util.Hashtable values)
Return the keys of the HashTable as a single String. |
static java.lang.String |
getContentList(java.util.Hashtable values,
java.lang.String separator)
Return the keys of the HashTable as a single String. |
static double |
getRnd()
Compute a random double between -1 and 1 |
static long |
getRndLong()
Compute a random long |
static java.lang.String |
gLTrim(java.lang.String str,
char c)
Generic left trim |
static void |
logStreamContent(java.io.InputStream is)
Write the whole content of a Stream |
static void |
logThreadInformations()
|
static void |
logThreadInformations(java.lang.String header)
|
static java.io.File |
normalizeIfNotExists(java.io.File file,
java.lang.String acceptedChars,
char replacementChar)
Call "normalizeString" on each non existing part of the file's path. |
static java.lang.String |
normalizeString(java.lang.String s,
java.lang.String acceptedChars,
char replacementChar)
Normalize the String passed as argument. |
static boolean |
passFilter(java.lang.String s,
java.lang.String[] filter)
Return true if s equals one of the Strings contained in the "filter" array or if they start with one of them plus "/" |
static int |
readLine(java.io.InputStream is,
byte[] buff)
Read the stream until a CRLF (13-10) is reached OR the buffer's limit is reached. |
static byte[] |
readLineBA(java.io.InputStream is,
int size)
Read the stream until a CRLF (13-10) is reached OR the buffer's limit is reached. |
static java.lang.String |
readLineString(java.io.InputStream is)
Read the stream until a CRLF (13-10) |
static java.lang.String |
replace(java.lang.String initialString,
java.lang.String toReplace,
java.lang.String replacement)
Replace all occurences of "toReplace" in "initialString" by "replacement" |
static java.util.Vector |
split(java.lang.String orig,
java.lang.String pattern)
Split a String in an array of Strings |
static java.lang.String |
subString(java.lang.String orig,
java.lang.String balise1,
int offset,
java.lang.String balise2)
Return the String between the second and fourth arguments |
static java.lang.String |
trimSlashes(java.lang.String orig)
Remove all '/' in the beginning of the file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static java.lang.Short buildOptimizedShort(short s)
public static java.lang.String replace(java.lang.String initialString, java.lang.String toReplace, java.lang.String replacement)
public static int count(java.lang.String chaine, java.lang.String str)
public static int count(java.lang.String chaine, int startIndex, char c)
public static void logThreadInformations()
public static void logThreadInformations(java.lang.String header)
public static double getRnd()
public static long getRndLong()
public static java.lang.String base64Encode(byte[] data)
public static byte[] base64Decode(java.lang.String data)
public static java.lang.String base16Encode(byte[] data)
public static byte[] base16Decode(java.lang.String input)
public static java.lang.String subString(java.lang.String orig, java.lang.String balise1, int offset, java.lang.String balise2)
public static java.util.Vector split(java.lang.String orig, java.lang.String pattern)
public static java.lang.String gLTrim(java.lang.String str, char c)
public static java.lang.String getClassName(java.lang.String path)
public static void logStreamContent(java.io.InputStream is)
public static java.lang.String getContentList(java.util.Hashtable values, java.lang.String separator)
public static java.lang.String getContentList(java.util.Hashtable values)
public static java.lang.String adjustSize(java.lang.String s, int size, char completion, boolean dockRight)
public static java.lang.String duplicate(java.lang.String s, int nb)
public static java.lang.String normalizeString(java.lang.String s, java.lang.String acceptedChars, char replacementChar)
public static java.lang.String trimSlashes(java.lang.String orig)
public static boolean passFilter(java.lang.String s, java.lang.String[] filter)
public static java.io.File normalizeIfNotExists(java.io.File file, java.lang.String acceptedChars, char replacementChar)
public static int readLine(java.io.InputStream is, byte[] buff) throws java.io.IOException
java.io.IOException
public static byte[] readLineBA(java.io.InputStream is, int size) throws java.io.IOException
java.io.IOException
public static java.lang.String readLineString(java.io.InputStream is) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |