public final class LittleEndianDataOutputStream
extends java.io.FilterOutputStream
implements java.io.DataOutput
DataOutput
that uses little-endian byte ordering for writing
char
, short
, int
, float
, double
, and long
values.
writeBytes(String)
, writeChars(String)
,
writeUTF(String)
.Constructor and Description |
---|
LittleEndianDataOutputStream(java.io.OutputStream out) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
write(byte[] b,
int off,
int len) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(java.lang.String s)
UnSupported operation.
|
void |
writeChar(int v)
Write the char value in a little endian order.
|
void |
writeChars(java.lang.String s)
UnSupported operation.
|
void |
writeDouble(double v)
Write the double value in a little endian order.
|
void |
writeFloat(float v)
Write the float value in a little endian order.
|
void |
writeInt(int v)
Write the int value in a little endian order.
|
void |
writeLong(long v)
Write the long value in a little endian order.
|
void |
writeShort(int v)
Write the short value in a little endian order.
|
void |
writeUTF(java.lang.String str)
UnSupported operation.
|
public LittleEndianDataOutputStream(java.io.OutputStream out)
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in interface java.io.DataOutput
write
in class java.io.FilterOutputStream
java.io.IOException
public void writeBoolean(boolean v) throws java.io.IOException
writeBoolean
in interface java.io.DataOutput
java.io.IOException
public void writeByte(int v) throws java.io.IOException
writeByte
in interface java.io.DataOutput
java.io.IOException
public void writeShort(int v) throws java.io.IOException
(byte)(0xff & v)
(byte)(0xff & (v >> 8))
writeShort
in interface java.io.DataOutput
java.io.IOException
public void writeChar(int v) throws java.io.IOException
(byte)(0xff & v)
(byte)(0xff & (v >> 8))
writeChar
in interface java.io.DataOutput
java.io.IOException
public void writeInt(int v) throws java.io.IOException
(byte)(0xff & v)
(byte)(0xff & (v >> 8))
(byte)(0xff & (v >> 16))
(byte)(0xff & (v >> 24))
writeInt
in interface java.io.DataOutput
java.io.IOException
public void writeLong(long v) throws java.io.IOException
(byte)(0xff & v)
(byte)(0xff & (v >> 8))
(byte)(0xff & (v >> 16))
(byte)(0xff & (v >> 24))
(byte)(0xff & (v >> 32))
(byte)(0xff & (v >> 40))
(byte)(0xff & (v >> 48))
(byte)(0xff & (v >> 56))
writeLong
in interface java.io.DataOutput
java.io.IOException
public void writeFloat(float v) throws java.io.IOException
writeFloat
in interface java.io.DataOutput
java.io.IOException
public void writeDouble(double v) throws java.io.IOException
writeDouble
in interface java.io.DataOutput
java.io.IOException
public void writeBytes(java.lang.String s) throws java.io.IOException
writeBytes
in interface java.io.DataOutput
java.io.IOException
public void writeChars(java.lang.String s) throws java.io.IOException
writeChars
in interface java.io.DataOutput
java.io.IOException
public void writeUTF(java.lang.String str) throws java.io.IOException
writeUTF
in interface java.io.DataOutput
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException