|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttokyocabinet.Util
public class Util
Set of utility methods.
Method Summary | |
---|---|
static int |
atoi(java.lang.String str)
Convert a string to integer. |
static long |
atol(java.lang.String str)
Convert a string to integer. |
static int |
chdir(java.lang.String path)
Change current working directory using the native function `chdir' defined in POSIX. |
static java.lang.Object |
deserialize(byte[] serial)
Redintegrate a serialized object. |
static java.lang.String |
getcwd()
Get current working directory using the native function `getcwd' defined in POSIX. |
static java.lang.String |
getenv(java.lang.String name)
Get an environment variable using the native function `getenv' defined in POSIX and ANSI C. |
static int |
getpid()
Get process identification using the native function `getpid' defined in POSIX. |
static java.lang.String |
itoa(long num,
int cols,
char padding)
Convert a integer to string. |
static byte[] |
packdouble(double num)
Serialize a real number. |
static byte[] |
packint(int num)
Serialize an integer. |
static int |
putenv(java.lang.String name,
java.lang.String value)
Set an environment variable using the native function `putenv' defined in POSIX and ANSI C. |
static byte[] |
serialize(java.lang.Object obj)
Serialize an object. |
static int |
system(java.lang.String cmd)
Execute a shell command using the native function `system' defined in POSIX and ANSI C. |
static double |
time()
Get the current time. |
static double |
unpackdouble(byte[] serial)
Redintegrate a serialized real number. |
static int |
unpackint(byte[] serial)
Redintegrate a serialized integer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int atoi(java.lang.String str)
str
- a decimal string.
public static long atol(java.lang.String str)
str
- a decimal string.
public static int chdir(java.lang.String path)
path
- the path of a directory.
public static java.lang.Object deserialize(byte[] serial)
serial
- a byte array of the serialized object.
public static java.lang.String getcwd()
public static java.lang.String getenv(java.lang.String name)
name
- the name of an environment variable.
public static int getpid()
public static java.lang.String itoa(long num, int cols, char padding)
num
- a number.cols
- the number of columns. The result string may be longer than it.padding
- a padding character to fulfil columns with.public static byte[] packdouble(double num)
num
- a real number.
public static byte[] packint(int num)
num
- an integer.
public static int putenv(java.lang.String name, java.lang.String value)
name
- the name of an environment variable.value
- value of an environment variable.
public static byte[] serialize(java.lang.Object obj)
obj
- a serializable object.
public static int system(java.lang.String cmd)
cmd
- a command line.
public static double time()
public static double unpackdouble(byte[] serial)
serial
- a byte array of the serialized real number.
public static int unpackint(byte[] serial)
serial
- a byte array of the serialized integer.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |