|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.io.OutputStream
com.tangosol.io.WrapperOutputStream
com.tangosol.io.PackedDataOutputStream
public class PackedDataOutputStream
This is an imitation DataOutputStream class that packs its data tighter using variable-length integers and supports UTF longer than 64KB.
Warning! This class is not intended to be thread-safe!
| Field Summary |
|---|
| Fields inherited from class com.tangosol.io.WrapperOutputStream |
|---|
m_out |
| Constructor Summary | |
|---|---|
PackedDataOutputStream(OutputStream out)
Construct a PackedDataOutputStream that will output to the specified OutputStream object. |
|
| Method Summary | |
|---|---|
void |
writeBoolean(boolean f)
Writes the boolean value f. |
void |
writeByte(int b)
Writes the eight low-order bits of the argument b. |
void |
writeBytes(String s)
Writes the String s, but only the low-order byte from each
character of the String is written. |
void |
writeChar(int ch)
Writes a char value, comprised of the 16 low-order bits of the argument ch; the 16 high-order bits of ch are
ignored. |
void |
writeChars(String s)
Writes the String s as a sequence of characters. |
void |
writeDouble(double dfl)
Writes a double value. |
void |
writeFloat(float fl)
Writes a float value. |
void |
writeInt(int n)
Writes an int value. |
void |
writeLong(long l)
Writes a long value. |
void |
writeShort(int n)
Writes a short value, comprised of the 16 low-order bits of the argument n; the 16 high-order bits of n are
ignored. |
void |
writeUTF(String s)
Writes the String s as a sequence of characters, but using
UTF-8 encoding for the characters, and including the String length data
so that the corresponding DataInput.readUTF() method can
reconstitute a String from the written data. |
| Methods inherited from class com.tangosol.io.WrapperOutputStream |
|---|
close, ensureOutputStream, flush, getOutputStream, setOutputStream, write, write, write |
| Methods inherited from interface java.io.DataOutput |
|---|
write, write, write |
| Constructor Detail |
|---|
public PackedDataOutputStream(OutputStream out)
out - an OutputStream to write to| Method Detail |
|---|
public void writeBoolean(boolean f)
throws IOException
f.
writeBoolean in interface DataOutputf - the boolean to be written
IOException - if an I/O error occurs
public void writeByte(int b)
throws IOException
b. The 24
high-order bits of b are ignored.
writeByte in interface DataOutputb - the byte to write (passed as an integer)
IOException - if an I/O error occurs
public void writeShort(int n)
throws IOException
n; the 16 high-order bits of n are
ignored.
writeShort in interface DataOutputn - the short to write (passed as an integer)
IOException - if an I/O error occurs
public void writeChar(int ch)
throws IOException
ch; the 16 high-order bits of ch are
ignored.
writeChar in interface DataOutputch - the char to write (passed as an integer)
IOException - if an I/O error occurs
public void writeInt(int n)
throws IOException
writeInt in interface DataOutputn - the int to write
IOException - if an I/O error occurs
public void writeLong(long l)
throws IOException
writeLong in interface DataOutputl - the long to write
IOException - if an I/O error occurs
public void writeFloat(float fl)
throws IOException
writeFloat in interface DataOutputfl - the float to write
IOException - if an I/O error occurs
public void writeDouble(double dfl)
throws IOException
writeDouble in interface DataOutputdfl - the double to write
IOException - if an I/O error occurs
public void writeBytes(String s)
throws IOException
s, but only the low-order byte from each
character of the String is written.
writeBytes in interface DataOutputs - the String to write
IOException - if an I/O error occurs
NullPointerException - if s is null
public void writeChars(String s)
throws IOException
s as a sequence of characters.
writeChars in interface DataOutputs - the String to write
IOException - if an I/O error occurs
NullPointerException - if s is null
public void writeUTF(String s)
throws IOException
s as a sequence of characters, but using
UTF-8 encoding for the characters, and including the String length data
so that the corresponding DataInput.readUTF() method can
reconstitute a String from the written data.
writeUTF in interface DataOutputs - the String to write
IOException - if an I/O error occurs
NullPointerException - if s is null
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||