Package com.automation_pros.odva.endian
Class EndianOutputWrapper
- java.lang.Object
-
- com.automation_pros.odva.endian.EndianOutputWrapper
-
- All Implemented Interfaces:
EndianDataOutput,java.io.DataOutput
public class EndianOutputWrapper extends java.lang.Object implements EndianDataOutput
-
-
Constructor Summary
Constructors Constructor Description EndianOutputWrapper(java.io.DataOutput out)Wrap any otherDataOutputto provide both little-endian and big-endian data output operations.EndianOutputWrapper(java.io.DataOutput out, int skip)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckWriteSkip(int n)voidwrite(byte[] src)voidwrite(byte[] src, int offset, int length)voidwrite(int b)voidwriteBoolean(boolean v)voidwriteByte(int v)voidwriteBytes(java.lang.String s)voidwriteChar(int v)voidwriteCharLE(int v)Little-endian counterpart towriteChar().voidwriteChars(java.lang.String s)voidwriteCharsLE(java.lang.String s)Little-endian counterpart towriteChars().voidwriteDouble(double v)voidwriteDoubleLE(double v)Little-endian counterpart towriteDouble().voidwriteFloat(float v)voidwriteFloatLE(float f)Little-endian counterpart towriteFloat().voidwriteInt(int v)voidwriteIntLE(int v)Little-endian counterpart towriteInt().voidwriteLong(long v)voidwriteLongLE(long v)Little-endian counterpart towriteLong().voidwriteShort(int v)voidwriteShortLE(int v)Little-endian counterpart towriteShort().voidwriteUTF(java.lang.String s)
-
-
-
Constructor Detail
-
EndianOutputWrapper
public EndianOutputWrapper(java.io.DataOutput out)
Wrap any otherDataOutputto provide both little-endian and big-endian data output operations.- Parameters:
out- The DataOutput to wrap.
-
EndianOutputWrapper
public EndianOutputWrapper(java.io.DataOutput out, int skip)
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein interfacejava.io.DataOutput- Throws:
java.io.IOException
-
write
public void write(byte[] src) throws java.io.IOException- Specified by:
writein interfacejava.io.DataOutput- Throws:
java.io.IOException
-
write
public void write(byte[] src, int offset, int length) throws java.io.IOException- Specified by:
writein interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeBoolean
public void writeBoolean(boolean v) throws java.io.IOException- Specified by:
writeBooleanin interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeByte
public void writeByte(int v) throws java.io.IOException- Specified by:
writeBytein interfacejava.io.DataOutput- Throws:
java.io.IOException
-
checkWriteSkip
protected boolean checkWriteSkip(int n) throws java.io.IOException- Throws:
java.io.IOException
-
writeShort
public void writeShort(int v) throws java.io.IOException- Specified by:
writeShortin interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeChar
public void writeChar(int v) throws java.io.IOException- Specified by:
writeCharin interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeInt
public void writeInt(int v) throws java.io.IOException- Specified by:
writeIntin interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeLong
public void writeLong(long v) throws java.io.IOException- Specified by:
writeLongin interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeFloat
public void writeFloat(float v) throws java.io.IOException- Specified by:
writeFloatin interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeDouble
public void writeDouble(double v) throws java.io.IOException- Specified by:
writeDoublein interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeBytes
public void writeBytes(java.lang.String s) throws java.io.IOException- Specified by:
writeBytesin interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeChars
public void writeChars(java.lang.String s) throws java.io.IOException- Specified by:
writeCharsin interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeUTF
public void writeUTF(java.lang.String s) throws java.io.IOException- Specified by:
writeUTFin interfacejava.io.DataOutput- Throws:
java.io.IOException
-
writeCharLE
public void writeCharLE(int v) throws java.io.IOExceptionDescription copied from interface:EndianDataOutputLittle-endian counterpart towriteChar().- Specified by:
writeCharLEin interfaceEndianDataOutput- Throws:
java.io.IOException
-
writeCharsLE
public void writeCharsLE(java.lang.String s) throws java.io.IOExceptionDescription copied from interface:EndianDataOutputLittle-endian counterpart towriteChars().- Specified by:
writeCharsLEin interfaceEndianDataOutput- Throws:
java.io.IOException
-
writeDoubleLE
public void writeDoubleLE(double v) throws java.io.IOExceptionDescription copied from interface:EndianDataOutputLittle-endian counterpart towriteDouble().- Specified by:
writeDoubleLEin interfaceEndianDataOutput- Throws:
java.io.IOException
-
writeFloatLE
public void writeFloatLE(float f) throws java.io.IOExceptionDescription copied from interface:EndianDataOutputLittle-endian counterpart towriteFloat().- Specified by:
writeFloatLEin interfaceEndianDataOutput- Throws:
java.io.IOException
-
writeShortLE
public void writeShortLE(int v) throws java.io.IOExceptionDescription copied from interface:EndianDataOutputLittle-endian counterpart towriteShort().- Specified by:
writeShortLEin interfaceEndianDataOutput- Throws:
java.io.IOException
-
writeIntLE
public void writeIntLE(int v) throws java.io.IOExceptionDescription copied from interface:EndianDataOutputLittle-endian counterpart towriteInt().- Specified by:
writeIntLEin interfaceEndianDataOutput- Throws:
java.io.IOException
-
writeLongLE
public void writeLongLE(long v) throws java.io.IOExceptionDescription copied from interface:EndianDataOutputLittle-endian counterpart towriteLong().- Specified by:
writeLongLEin interfaceEndianDataOutput- Throws:
java.io.IOException
-
-