|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
com.google.common.io.LittleEndianDataOutputStream
@Beta public class LittleEndianDataOutputStream
An implementation of DataOutput that uses little-endian byte ordering
for writing char, short, int, float, double, and long values.
Note: This class intentionally violates the specification of its
supertype DataOutput, which explicitly requires big-endian byte
order.
| Field Summary |
|---|
| Fields inherited from class java.io.FilterOutputStream |
|---|
out |
| Constructor Summary | |
|---|---|
LittleEndianDataOutputStream(java.io.OutputStream out)
Creates a LittleEndianDataOutputStream that wraps the given stream. |
|
| Method Summary | |
|---|---|
void |
write(byte[] b,
int off,
int len)
|
void |
writeBoolean(boolean v)
|
void |
writeByte(int v)
|
void |
writeBytes(java.lang.String s)
Deprecated. The semantics of writeBytes(String s) are considered
dangerous. Please use writeUTF(String s),
writeChars(String s) or another write method instead. |
void |
writeChar(int v)
Writes a char as specified by DataOutputStream.writeChar(int),
except using little-endian byte order. |
void |
writeChars(java.lang.String s)
Writes a String as specified by
DataOutputStream.writeChars(String), except each character is
written using little-endian byte order. |
void |
writeDouble(double v)
Writes a double as specified by
DataOutputStream.writeDouble(double), except using little-endian
byte order. |
void |
writeFloat(float v)
Writes a float as specified by
DataOutputStream.writeFloat(float), except using little-endian byte
order. |
void |
writeInt(int v)
Writes an int as specified by
DataOutputStream.writeInt(int), except using little-endian byte
order. |
void |
writeLong(long v)
Writes a long as specified by
DataOutputStream.writeLong(long), except using little-endian byte
order. |
void |
writeShort(int v)
Writes a short as specified by
DataOutputStream.writeShort(int), except using little-endian byte
order. |
void |
writeUTF(java.lang.String str)
|
| Methods inherited from class java.io.FilterOutputStream |
|---|
close, flush, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.io.DataOutput |
|---|
write, write |
| Constructor Detail |
|---|
public LittleEndianDataOutputStream(java.io.OutputStream out)
LittleEndianDataOutputStream that wraps the given stream.
out - the stream to delegate to| Method Detail |
|---|
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in interface java.io.DataOutputwrite in class java.io.FilterOutputStreamjava.io.IOException
public void writeBoolean(boolean v)
throws java.io.IOException
writeBoolean in interface java.io.DataOutputjava.io.IOException
public void writeByte(int v)
throws java.io.IOException
writeByte in interface java.io.DataOutputjava.io.IOException
@Deprecated
public void writeBytes(java.lang.String s)
throws java.io.IOException
writeBytes(String s) are considered
dangerous. Please use writeUTF(String s),
writeChars(String s) or another write method instead.
writeBytes in interface java.io.DataOutputjava.io.IOException
public void writeChar(int v)
throws java.io.IOException
DataOutputStream.writeChar(int),
except using little-endian byte order.
writeChar in interface java.io.DataOutputjava.io.IOException - if an I/O error occurs
public void writeChars(java.lang.String s)
throws java.io.IOException
String as specified by
DataOutputStream.writeChars(String), except each character is
written using little-endian byte order.
writeChars in interface java.io.DataOutputjava.io.IOException - if an I/O error occurs
public void writeDouble(double v)
throws java.io.IOException
double as specified by
DataOutputStream.writeDouble(double), except using little-endian
byte order.
writeDouble in interface java.io.DataOutputjava.io.IOException - if an I/O error occurs
public void writeFloat(float v)
throws java.io.IOException
float as specified by
DataOutputStream.writeFloat(float), except using little-endian byte
order.
writeFloat in interface java.io.DataOutputjava.io.IOException - if an I/O error occurs
public void writeInt(int v)
throws java.io.IOException
int as specified by
DataOutputStream.writeInt(int), except using little-endian byte
order.
writeInt in interface java.io.DataOutputjava.io.IOException - if an I/O error occurs
public void writeLong(long v)
throws java.io.IOException
long as specified by
DataOutputStream.writeLong(long), except using little-endian byte
order.
writeLong in interface java.io.DataOutputjava.io.IOException - if an I/O error occurs
public void writeShort(int v)
throws java.io.IOException
short as specified by
DataOutputStream.writeShort(int), except using little-endian byte
order.
writeShort in interface java.io.DataOutputjava.io.IOException - if an I/O error occurs
public void writeUTF(java.lang.String str)
throws java.io.IOException
writeUTF in interface java.io.DataOutputjava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||