|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.knime.core.data.container.LongUTFDataOutputStream
public class LongUTFDataOutputStream
Wrapper class of a DataOutputStream that also allows to write UTF strings longer than 65535. This class delegates all method calls -- except for the writeUTF method -- and delegates it to an underlying output stream.
The writeUTF method of this class uses a longer header (10 bytes in total) to encode the utf length when processing long strings. This class has been written to overcome a limitation in java ... which is not going to be fixed, see also the sun bug report at http://bugs.sun.com/bugdatabase, bug id 4025564.
DataOutputStream.writeUTF(String)
Field Summary | |
---|---|
(package private) static int |
USE_LONG_UTF
Short that is written in front of UTF'ed byte stream whose length is longer than 65535 bytes. |
Constructor Summary | |
---|---|
LongUTFDataOutputStream(DataOutputStream output)
Wraps the DataOutputStream argument and delegates all method calls (except the writeUTF method) to it. |
Method Summary | |
---|---|
void |
close()
|
void |
flush()
|
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
void |
writeBoolean(boolean v)
|
void |
writeByte(int v)
|
void |
writeBytes(String s)
|
void |
writeChar(int v)
|
void |
writeChars(String s)
|
void |
writeDouble(double v)
|
void |
writeFloat(float v)
|
void |
writeInt(int v)
|
void |
writeLong(long v)
|
void |
writeShort(int v)
|
void |
writeUTF(String str)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int USE_LONG_UTF
Constructor Detail |
---|
public LongUTFDataOutputStream(DataOutputStream output)
output
- The output stream to wrap.
NullPointerException
- If the argument is null
.Method Detail |
---|
public void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in interface DataOutput
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in interface DataOutput
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in interface DataOutput
write
in class OutputStream
IOException
public void writeBoolean(boolean v) throws IOException
writeBoolean
in interface DataOutput
IOException
public void writeByte(int v) throws IOException
writeByte
in interface DataOutput
IOException
public void writeBytes(String s) throws IOException
writeBytes
in interface DataOutput
IOException
public void writeChar(int v) throws IOException
writeChar
in interface DataOutput
IOException
public void writeChars(String s) throws IOException
writeChars
in interface DataOutput
IOException
public void writeDouble(double v) throws IOException
writeDouble
in interface DataOutput
IOException
public void writeFloat(float v) throws IOException
writeFloat
in interface DataOutput
IOException
public void writeInt(int v) throws IOException
writeInt
in interface DataOutput
IOException
public void writeLong(long v) throws IOException
writeLong
in interface DataOutput
IOException
public void writeShort(int v) throws IOException
writeShort
in interface DataOutput
IOException
public void writeUTF(String str) throws IOException
writeUTF
in interface DataOutput
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |