|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectariba.util.core.ServerUtil
public class ServerUtil
| Field Summary | |
|---|---|
static String |
HTTPSProxyPassword
|
static boolean |
isMicrosoftVM
|
static boolean |
isUnix
|
static boolean |
isWin32
|
static boolean |
isWin32Enabled
Useful for asking if it is legal to call a win32 specific api |
static boolean |
UseSecureRandomNumberGenerator
|
| Constructor Summary | |
|---|---|
ServerUtil()
|
|
| Method Summary | |
|---|---|
static boolean |
compareFilenames(String firstFilename,
String secondFilename)
|
static boolean |
compareInputStreams(InputStream firstStream,
InputStream secondStream)
|
static boolean |
compareInputStreams(InputStream firstStream,
InputStream secondStream,
byte[] buffer1,
byte[] buffer2)
|
static List |
fileExtension(String mimeType)
Returns the list of file extension names for the given mime type. |
static String |
filterMapValue(Map map,
String key,
char fillChar)
filterValue is useful for dumping out a Map for display in which a particular key's value is not suitable for display (e.g. |
static String |
filterMapValue(String input,
String filterKey,
char fillChar)
Params: input: a string, assumed to be a result of Map.toString() filterKey: the key for which the value is to be "filtered" fillChar: the value for which the value is to be overwritten Returns null if the key was not found |
static String |
mimeType(String fileExtension)
|
static String |
mimeType(String currentType,
String fileExtension)
if we don't have a current type or the current type is the default, then try to map it by file extension. |
static int |
nextRandomInt()
|
static long |
nextRandomLong()
|
static int |
nextSecureInt()
|
static long |
nextSecureLong()
|
static int |
parseInt(char[] charArray,
int charArrayLength)
Assuming the specified charArray represents an integer, returns that integer's value. |
static int |
parseInt(char[] charArray,
int charArrayLength,
int radix)
Assuming the specified charArray represents an integer, returns that integer's value. |
static int |
parseInt(int offset,
int scanLength,
char[] charArray,
int charArrayLength)
Assuming the specified charArray represents an integer, returns that integer's value. |
static int |
parseInt(int offset,
int scanLength,
char[] charArray,
int charArrayLength,
int radix)
Assuming the specified charArray represents an integer, returns that integer's value. |
static String |
quoteQuotes(String s,
char quote)
Rewrite 's' expanding each occurrence of character 'quote' with two of the same. |
static Random |
randomNumberGenerator()
|
static Random |
secureRandomNumberGenerator()
|
static void |
setSystemProperty(String key,
String value)
|
static String[] |
simpleParse(String line,
String delimeter)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String HTTPSProxyPassword
public static final boolean isWin32
public static final boolean isUnix
public static final boolean isMicrosoftVM
public static final boolean isWin32Enabled
public static boolean UseSecureRandomNumberGenerator
| Constructor Detail |
|---|
public ServerUtil()
| Method Detail |
|---|
public static String quoteQuotes(String s,
char quote)
public static boolean compareFilenames(String firstFilename,
String secondFilename)
public static boolean compareInputStreams(InputStream firstStream,
InputStream secondStream)
public static boolean compareInputStreams(InputStream firstStream,
InputStream secondStream,
byte[] buffer1,
byte[] buffer2)
public static String mimeType(String currentType,
String fileExtension)
public static String mimeType(String fileExtension)
public static List fileExtension(String mimeType)
mimeType - the mime type
Mapping.reverseMap
public static void setSystemProperty(String key,
String value)
public static String filterMapValue(Map map,
String key,
char fillChar)
public static String filterMapValue(String input,
String filterKey,
char fillChar)
public static String[] simpleParse(String line,
String delimeter)
public static int parseInt(int offset,
int scanLength,
char[] charArray,
int charArrayLength)
throws NumberFormatException
NumberFormatException - If the charArray does not contain a
parsable integer.
public static int parseInt(char[] charArray,
int charArrayLength,
int radix)
throws NumberFormatException
NumberFormatException - If the charArray does not contain a
parsable integer.
public static int parseInt(char[] charArray,
int charArrayLength)
throws NumberFormatException
NumberFormatException - If the charArray does not contain a
parsable integer.
public static int parseInt(int offset,
int scanLength,
char[] charArray,
int charArrayLength,
int radix)
throws NumberFormatException
NumberFormatException - If the charArray does not contain a
parsable integer.public static final Random secureRandomNumberGenerator()
public static final int nextSecureInt()
public static final long nextSecureLong()
public static final Random randomNumberGenerator()
public static final int nextRandomInt()
public static final long nextRandomLong()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||