Package daevil.iconexe
Class WriteBMP32.LittleEndianOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- java.io.DataOutputStream
-
- daevil.iconexe.WriteBMP32.LittleEndianOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.DataOutput,java.io.Flushable,java.lang.AutoCloseable
- Enclosing class:
- WriteBMP32
public static class WriteBMP32.LittleEndianOutputStream extends java.io.DataOutputStream
-
-
Constructor Summary
Constructors Constructor Description LittleEndianOutputStream(java.io.OutputStream out)Creates a new instance of LittleEndianOutputStream, which will write to the specified target.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static doubleswapDouble(double value)Reverses the byte order of the source double valuestatic floatswapFloat(float value)Reverses the byte order of the source float valuestatic intswapInteger(int value)Reverses the byte order of the source int valuestatic longswapLong(long value)Reverses the byte order of the source long valuestatic shortswapShort(short value)Reverses the byte order of the source short valuestatic java.lang.StringBuildertoCharString(java.lang.StringBuilder sb, int i, int bytes, char def)static java.lang.StringtoHexString(int i, boolean littleEndian, int bytes)static java.lang.StringtoInfoString(int info)voidwriteDoubleLE(double value)Writes a little-endian double valuevoidwriteFloatLE(float value)Writes a little-endian float valuevoidwriteIntLE(int value)Writes a little-endian int valuevoidwriteLongLE(long value)Writes a little-endian long valuevoidwriteShortLE(short value)Writes a little-endian short valuevoidwriteUnsignedInt(long value)voidwriteUnsignedIntLE(long value)-
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
-
-
-
Method Detail
-
swapShort
public static short swapShort(short value)
Reverses the byte order of the source short value- Parameters:
value- the source value- Returns:
- the converted value
-
swapInteger
public static int swapInteger(int value)
Reverses the byte order of the source int value- Parameters:
value- the source value- Returns:
- the converted value
-
swapLong
public static long swapLong(long value)
Reverses the byte order of the source long value- Parameters:
value- the source value- Returns:
- the converted value
-
swapFloat
public static float swapFloat(float value)
Reverses the byte order of the source float value- Parameters:
value- the source value- Returns:
- the converted value
-
swapDouble
public static double swapDouble(double value)
Reverses the byte order of the source double value- Parameters:
value- the source value- Returns:
- the converted value
-
toHexString
public static java.lang.String toHexString(int i, boolean littleEndian, int bytes)
-
toCharString
public static java.lang.StringBuilder toCharString(java.lang.StringBuilder sb, int i, int bytes, char def)
-
toInfoString
public static java.lang.String toInfoString(int info)
-
writeShortLE
public void writeShortLE(short value) throws java.io.IOExceptionWrites a little-endian short value- Parameters:
value- the source value to convert- Throws:
java.io.IOException- if an error occurs
-
writeIntLE
public void writeIntLE(int value) throws java.io.IOExceptionWrites a little-endian int value- Parameters:
value- the source value to convert- Throws:
java.io.IOException- if an error occurs
-
writeFloatLE
public void writeFloatLE(float value) throws java.io.IOExceptionWrites a little-endian float value- Parameters:
value- the source value to convert- Throws:
java.io.IOException- if an error occurs
-
writeLongLE
public void writeLongLE(long value) throws java.io.IOExceptionWrites a little-endian long value- Parameters:
value- the source value to convert- Throws:
java.io.IOException- if an error occurs
-
writeDoubleLE
public void writeDoubleLE(double value) throws java.io.IOExceptionWrites a little-endian double value- Parameters:
value- the source value to convert- Throws:
java.io.IOException- if an error occurs
-
writeUnsignedInt
public void writeUnsignedInt(long value) throws java.io.IOException- Throws:
java.io.IOException
-
writeUnsignedIntLE
public void writeUnsignedIntLE(long value) throws java.io.IOException- Throws:
java.io.IOException
-
-