public class LongStringUtils extends java.lang.Object
DataInputStream and DataOutputStream. The reason is that
while modified UTF8 handling is implemented in these classes, they can only
handle short strings (less than 2^16 characters). As the code is badly
modularized, we had to copy and modify it.| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SHORT_STRING_LENGTH
Maximal length of a short string.
|
| Constructor and Description |
|---|
LongStringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
readLongString(java.io.DataInputStream in)
This is a copy of
DataInputStream.readUTF(DataInput) with the main
difference that the length is not read as a short but as a long. |
static void |
writeUTF(java.lang.String string,
java.io.DataOutputStream out)
This is a copy of
DataOutputStream.writeUTF(String) with the main
difference that the length is not read as a short but as a long. |
public static final int MAX_SHORT_STRING_LENGTH
public LongStringUtils()
public static java.lang.String readLongString(java.io.DataInputStream in) throws java.io.IOException
DataInputStream.readUTF(DataInput) with the main
difference that the length is not read as a short but as a long.java.io.IOExceptionpublic static void writeUTF(java.lang.String string, java.io.DataOutputStream out) throws java.io.IOException
DataOutputStream.writeUTF(String) with the main
difference that the length is not read as a short but as a long.java.io.IOException