public class LongUTFDataOutputStream extends DataOutputStream
written
out
Constructor and Description |
---|
LongUTFDataOutputStream(OutputStream out) |
Modifier and Type | Method and Description |
---|---|
static int |
countUTF(String str) |
void |
writeLongUTF(String str)
Checks the length of the to-be-written UTF-8 array, if the length is below 64k then
DataOutputStream.writeUTF(String) is called, otherwise a 4-byte (int) is injected to list/count
the appended UTF-8 bytes |
static void |
writeShortOrInt(DataOutputStream dos,
int value) |
void |
writeShortOrInt(int value) |
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
close, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write
public LongUTFDataOutputStream(OutputStream out)
public void writeShortOrInt(int value) throws IOException
IOException
public static void writeShortOrInt(DataOutputStream dos, int value) throws IOException
IOException
public void writeLongUTF(String str) throws IOException
DataOutputStream.writeUTF(String)
is called, otherwise a 4-byte (int) is injected to list/count
the appended UTF-8 bytesstr
- the string to be written as UTF8-modifiedIOException
public static int countUTF(String str)