Class LittleEndianFileRW

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class LittleEndianFileRW
    extends CDataFileRWAccess
    • Constructor Detail

      • LittleEndianFileRW

        public LittleEndianFileRW​(java.io.RandomAccessFile in,
                                  int pointerSize)
    • Method Detail

      • readShort

        public final short readShort()
                              throws java.io.IOException
        Specified by:
        readShort in class CDataReadWriteAccess
        Throws:
        java.io.IOException
      • writeShort

        public final void writeShort​(short value)
                              throws java.io.IOException
        Specified by:
        writeShort in class CDataReadWriteAccess
        Throws:
        java.io.IOException
      • readInt

        public final int readInt()
                          throws java.io.IOException
        Specified by:
        readInt in class CDataReadWriteAccess
        Throws:
        java.io.IOException
      • writeInt

        public final void writeInt​(int value)
                            throws java.io.IOException
        Specified by:
        writeInt in class CDataReadWriteAccess
        Throws:
        java.io.IOException
      • readInt64

        public final long readInt64()
                             throws java.io.IOException
        Specified by:
        readInt64 in class CDataReadWriteAccess
        Throws:
        java.io.IOException
      • writeInt64

        public final void writeInt64​(long value)
                              throws java.io.IOException
        Specified by:
        writeInt64 in class CDataReadWriteAccess
        Throws:
        java.io.IOException
      • readFloat

        public final float readFloat()
                              throws java.io.IOException
        Specified by:
        readFloat in class CDataReadWriteAccess
        Throws:
        java.io.IOException
      • writeFloat

        public final void writeFloat​(float value)
                              throws java.io.IOException
        Specified by:
        writeFloat in class CDataReadWriteAccess
        Throws:
        java.io.IOException
      • readDouble

        public final double readDouble()
                                throws java.io.IOException
        Specified by:
        readDouble in class CDataReadWriteAccess
        Throws:
        java.io.IOException
      • writeDouble

        public final void writeDouble​(double value)
                               throws java.io.IOException
        Specified by:
        writeDouble in class CDataReadWriteAccess
        Throws:
        java.io.IOException
      • swapShort

        public static short swapShort​(short value)
        Converts a "short" value between endian systems.
        Parameters:
        value - value to convert
        Returns:
        the converted value
      • swapInteger

        public static int swapInteger​(int value)
        Converts a "int" value between endian systems.
        Parameters:
        value - value to convert
        Returns:
        the converted value
      • swapLong

        public static long swapLong​(long value)
        Converts a "long" value between endian systems.
        Parameters:
        value - value to convert
        Returns:
        the converted value
      • swapFloat

        public static float swapFloat​(float value)
        Converts a "float" value between endian systems.
        Parameters:
        value - value to convert
        Returns:
        the converted value
      • swapDouble

        public static double swapDouble​(double value)
        Converts a "double" value between endian systems.
        Parameters:
        value - value to convert
        Returns:
        the converted value