|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gnu.iou.utf8
This class contains two static tools for doing UTF-8 encoding and decoding.
UTF-8 is ASCII- transparent. It supports character sets requiring more than the seven bit ASCII base range of UTF-8, including Unicode, ISO-8859, ISO-10646, etc..
We do not use an ISO UCS code signature, and we do not use a Java Data I/O- style strlen prefix.
Constructor Summary | |
utf8()
|
Method Summary | |
static char[] |
decode(byte[] code)
|
static char[] |
decode(byte[] code,
int off,
int many)
Terminates decoding at a null character, value 0x0. |
static byte[] |
encode(char[] str)
|
static bbuf |
encode(char[] str,
bbuf bytbuf)
|
static byte[] |
encode(java.lang.String s)
|
static byte[] |
encode(java.lang.String s,
int paddedlen)
Add null padding to paddedlen if necessary. |
static int |
encoded(char[] str)
Length encoded |
static int |
encoded(java.lang.String s)
Length encoded |
static java.lang.String |
ETag(java.io.File f)
Hash of path and last modified date used in "HTTP/1.1". |
static long |
xor_fold(byte[] b)
The ubiquitous exclusive- or operation over input bits. |
static long |
xor_fold(java.lang.String str)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public utf8()
Method Detail |
public static final char[] decode(byte[] code)
public static final char[] decode(byte[] code, int off, int many)
public static final byte[] encode(char[] str)
public static final bbuf encode(char[] str, bbuf bytbuf)
public static final byte[] encode(java.lang.String s)
public static final byte[] encode(java.lang.String s, int paddedlen)
public static final int encoded(java.lang.String s)
public static final int encoded(char[] str)
public static final long xor_fold(byte[] b)
public static final long xor_fold(java.lang.String str)
public static final java.lang.String ETag(java.io.File f)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |