|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.walluck.oscar.AIMUtil
public class AIMUtil
AIM utilities.
Constructor Summary | |
---|---|
AIMUtil()
|
Method Summary | |
---|---|
static String |
about()
Print about information. |
static byte[] |
byteArrayFromHexString(String s)
Turn a hex string into the corresponding byte array. |
static String |
byteArrayToHexString(byte[] b)
Turn a byte array into the corresponding string. |
static String |
charsetAOLToJava(int charset)
Given a short value indicating the charset code, return the corresponding Java string indicating the charset. |
static String |
charsetAOLToJava(String charset)
Given a string indicating the charset, return the corresponding Java string indicating the charset. |
static String |
convertHTMLToOSCAR(String str)
Convert from HTML to OSCAR markup |
static String |
convertOSCARToHTML(String str)
Convert from OSCAR markup to HTML |
static String |
dirAOLToSys(String name)
Convert an AOL style directory name to system. |
static String |
dirSysToAOL(String name)
Convert a system style directory name to AOL. |
static String |
extractRoomName(String s)
Extract the name from a Chat name. |
static String |
flapChannelToString(int channel)
Print the plain-text description of a FLAP channel. |
static String |
getLibraryDate()
Get the library date. |
static String |
getLibraryVersion()
Get the library version. |
static String |
hexdump(byte[] data)
Returns a string representing a hex dump of the given byte array. |
static String |
memInfo()
Print Java runtime memory information before and after garbage collection. |
static String |
normalize(String sn)
Normalizes a screenname (removes spaces and lowercases all letters). |
static String |
parseProfileEncoding(String enc)
Parse a profile encoding string. |
static String |
prettyPrintTime(long time)
Convert the time elapsed in milliseconds to a pretty string. |
static String |
snacErrorToString(int error)
Return the plain-text description of a SNAC error. |
static String |
snacToString(int family,
int subtype)
Return the plain-text description of a SNAC given a family and subtype. |
static boolean |
snCmp(String sn1,
String sn2)
Checks two given screennames for equality. |
static int |
snLen(String sn)
Return the length of the given screenname (ignoring spaces). |
static byte[] |
uuidToByteArray(String uuid)
This lets us turn a UUID (Universally Uninque Identifier) string into a byte array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AIMUtil()
Method Detail |
---|
public static String getLibraryVersion()
public static String getLibraryDate()
public static int snLen(String sn)
sn
- the screenname
public static String normalize(String sn)
sn
- the non-normalized screenname
public static boolean snCmp(String sn1, String sn2)
sn1
- the first screennamesn2
- the second screenname
public static byte[] byteArrayFromHexString(String s)
s
- the hex string to convert
public static String byteArrayToHexString(byte[] b)
b
- the byte array to convert
public static byte[] uuidToByteArray(String uuid)
uuid
- the UUID string
public static String about()
public static String memInfo()
public static String flapChannelToString(int channel)
channel
- the FLAP channel
String
valuepublic static String snacToString(int family, int subtype)
family
- the SNAC familysubtype
- the SNAC subtype
public static String snacErrorToString(int error)
error
- the error code
public static String extractRoomName(String s)
s
- the Chat name
public static String dirAOLToSys(String name)
name
- the filename
public static String dirSysToAOL(String name)
name
- the filename
public static String prettyPrintTime(long time)
time
- the time elapsed in milliseconds
public static String hexdump(byte[] data)
data
- the byte array of the data you want to hex dump
public static String convertHTMLToOSCAR(String str)
str
- the string to convert
public static String convertOSCARToHTML(String str)
str
- the string to convert
public static String parseProfileEncoding(String enc)
enc
- the profile encoding
public static String charsetAOLToJava(int charset) throws UnsupportedEncodingException
charset
- the short value indicating the charset
UnsupportedEncodingException
- if an error occurspublic static String charsetAOLToJava(String charset) throws UnsupportedEncodingException
charset
- the string indicating the charset
UnsupportedEncodingException
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |