|
Marshalling API version 1.0.0.GA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.marshalling.UTFUtils
public final class UTFUtils

Handy utility methods for dealing with strings in the modified UTF-8 format.
| Method Summary | |
|---|---|
static long |
getLongUTFLength(String s)
Get the number of bytes used by the modified UTF-8 encoded form of the given string. |
static int |
getShortUTFLength(String s)
Get the number of bytes used by the modified UTF-8 encoded form of the given string. |
static String |
readUTFBytes(ByteInput input,
int len)
Read the given number of characters from the given byte input. |
static String |
readUTFZBytes(ByteInput input)
Read a null-terminated modified UTF-8 string from the given byte input. |
static void |
writeUTFBytes(ByteOutput output,
String s)
Write the modified UTF-8 form of the given string to the given output. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int getShortUTFLength(String s)
throws UTFDataFormatException
65536, an exception is thrown.
s - the string
UTFDataFormatException - if the string is longer than 65536 characterspublic static long getLongUTFLength(String s)
s - the string
public static void writeUTFBytes(ByteOutput output,
String s)
throws IOException
output - the output to write tos - the string
IOException - if an I/O error occurs
public static String readUTFBytes(ByteInput input,
int len)
throws IOException
input - the byte sourcelen - the number of characters to read
IOException - if an I/O error occurs
public static String readUTFZBytes(ByteInput input)
throws IOException
input - the input
IOException - if an I/O error occurs
|
Marshalling API version 1.0.0.GA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||