Class LittleEndianDataOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- java.io.DataOutputStream
-
- org.arakhne.afc.inputoutput.stream.LittleEndianDataOutputStream
-
- All Implemented Interfaces:
Closeable
,DataOutput
,Flushable
,AutoCloseable
public class LittleEndianDataOutputStream extends DataOutputStream
This class permits to write a stream with little endian data output.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:40
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- inputoutput
-
-
Field Summary
-
Fields inherited from class java.io.DataOutputStream
written
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description LittleEndianDataOutputStream(OutputStream out)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
writeBEDouble(double value)
Writes a Big Endian double on 8 bytes.void
writeBEFloat(float value)
Writes a Big Endian float on 4 bytes.void
writeBEInt(int value)
Writes a Big Endian int on 4 bytes.void
writeBELong(long value)
Writes a Big Endian long on 8 bytes.void
writeBEShort(short value)
Writes a Big Endian short on 2 bytes.void
writeLEDouble(double value)
Writes a Little Endian double on 8 bytes.void
writeLEFloat(float value)
Writes a Little Endian float on 4 bytes.void
writeLEInt(int value)
Writes a Little Endian int on 4 bytes.void
writeLELong(long value)
Writes a Little Endian long on 8 bytes.void
writeLEShort(short value)
Writes a Little Endian short on 2 bytes.-
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from class java.io.FilterOutputStream
close, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
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
-
-
-
-
Constructor Detail
-
LittleEndianDataOutputStream
public LittleEndianDataOutputStream(OutputStream out)
Constructor.- Parameters:
out
- is the stream to write inside
-
-
Method Detail
-
writeBEDouble
public void writeBEDouble(double value) throws IOException
Writes a Big Endian double on 8 bytes.- Parameters:
value
- is the value to write- Throws:
IOException
- on error.
-
writeBEFloat
public void writeBEFloat(float value) throws IOException
Writes a Big Endian float on 4 bytes.- Parameters:
value
- is the value to write- Throws:
IOException
- on error.
-
writeBEInt
public void writeBEInt(int value) throws IOException
Writes a Big Endian int on 4 bytes.- Parameters:
value
- is the value to write- Throws:
IOException
- on error.
-
writeBELong
public void writeBELong(long value) throws IOException
Writes a Big Endian long on 8 bytes.- Parameters:
value
- is the value to write- Throws:
IOException
- on error.
-
writeBEShort
public void writeBEShort(short value) throws IOException
Writes a Big Endian short on 2 bytes.- Parameters:
value
- is the value to write- Throws:
IOException
- on error.
-
writeLEDouble
public void writeLEDouble(double value) throws IOException
Writes a Little Endian double on 8 bytes.- Parameters:
value
- is the value to write- Throws:
IOException
- on error.
-
writeLEFloat
public void writeLEFloat(float value) throws IOException
Writes a Little Endian float on 4 bytes.- Parameters:
value
- is the value to write- Throws:
IOException
- on error.
-
writeLEInt
public void writeLEInt(int value) throws IOException
Writes a Little Endian int on 4 bytes.- Parameters:
value
- is the value to write- Throws:
IOException
- on error.
-
writeLELong
public void writeLELong(long value) throws IOException
Writes a Little Endian long on 8 bytes.- Parameters:
value
- is the value to write- Throws:
IOException
- on error.
-
writeLEShort
public void writeLEShort(short value) throws IOException
Writes a Little Endian short on 2 bytes.- Parameters:
value
- is the value to write- Throws:
IOException
- on error.
-
-