|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Free.util.StringByteTools
Because all FREE communications (like HTTP) must be ASCII we can create some String <-> Byte conversion tools that bypass the massive performance hit of dealing with all Unicode characters. This class is based on code from "Java Performance and Scalbility. Volume 1" by Dov Bulka where figures indicate a factor of 6.8 perfomance improvement by using these methods.
Constructor Summary | |
StringByteTools()
|
Method Summary | |
static byte[] |
asciiGetBytes(java.lang.String buf)
This method converts a String to bytes. |
static java.lang.String |
asciiGetString(byte[] buf)
This method converts bytes to a String. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public StringByteTools()
Method Detail |
public static byte[] asciiGetBytes(java.lang.String buf)
buf
- String to be convertedpublic static java.lang.String asciiGetString(byte[] buf)
buf
- Bytes to be converted
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |