|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fudgemsg.ModifiedUTF8Util
@Deprecated public class ModifiedUTF8Util
Code relating to working with Modified UTF-8 data.
The code here was originally in DataInputStream
and
DataOutputStream
, but it's been improved and modified
to suit the use of Fudge in a superior way.
Deprecated in favour of using proper UTF8 instead.
Constructor Summary | |
---|---|
ModifiedUTF8Util()
Deprecated. |
Method Summary | |
---|---|
static String |
decodeString(byte[] bytearr)
Deprecated. |
static byte[] |
encodeAsModifiedUTF8(String str)
Deprecated. |
static int |
modifiedUTF8Length(String str)
Deprecated. |
static String |
readString(DataInput is,
int utflen)
Deprecated. |
static int |
writeModifiedUTF8(String str,
DataOutput os)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModifiedUTF8Util()
Method Detail |
---|
public static int modifiedUTF8Length(String str)
str
- string to calculate length of
public static byte[] encodeAsModifiedUTF8(String str) throws UTFDataFormatException
str
- string to encode
UTFDataFormatException
- if the string is too longpublic static int writeModifiedUTF8(String str, DataOutput os) throws IOException
str
- string to writeos
- target to write to
IOException
- if the target raises onepublic static String readString(DataInput is, int utflen) throws IOException
is
- source to read fromutflen
- number of bytes to read
IOException
- if the source raises one or the UTF data is malformedpublic static String decodeString(byte[] bytearr) throws UTFDataFormatException
bytearr
- byte data to decode
UTFDataFormatException
- if the byte data is not valid UTF-8
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |