Class ERandomAccessFile

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

    public class ERandomAccessFile
    extends java.io.RandomAccessFile
    Restriction:
    This class is not intended to be subclassed by clients.
    • Constructor Summary

      Constructors 
      Constructor Description
      ERandomAccessFile​(java.io.File file, java.lang.String mode)  
      ERandomAccessFile​(java.lang.String file, java.lang.String mode)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getFilePointer()  
      java.lang.String getPath()
      Get the path of the file reader
      java.nio.ByteOrder order()
      Get the byte order of the file
      void readFullyE​(byte[] bytes)  
      long readIntE()  
      long readLongE()  
      short readShortE()  
      void seek​(long pos)  
      void setEndian​(boolean le)  
      void setFileOffset​(long offset)  
      • Methods inherited from class java.io.RandomAccessFile

        close, getChannel, getFD, length, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ERandomAccessFile

        public ERandomAccessFile​(java.lang.String file,
                                 java.lang.String mode)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • ERandomAccessFile

        public ERandomAccessFile​(java.io.File file,
                                 java.lang.String mode)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • setEndian

        public void setEndian​(boolean le)
      • readShortE

        public final short readShortE()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • readIntE

        public final long readIntE()
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • readLongE

        public final long readLongE()
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • readFullyE

        public final void readFullyE​(byte[] bytes)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • setFileOffset

        public void setFileOffset​(long offset)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getPath

        public java.lang.String getPath()
        Get the path of the file reader
        Since:
        7.0
      • getFilePointer

        public long getFilePointer()
                            throws java.io.IOException
        Overrides:
        getFilePointer in class java.io.RandomAccessFile
        Throws:
        java.io.IOException
      • seek

        public void seek​(long pos)
                  throws java.io.IOException
        Overrides:
        seek in class java.io.RandomAccessFile
        Throws:
        java.io.IOException
      • order

        public java.nio.ByteOrder order()
        Get the byte order of the file
        Returns:
        ByteOrder.LITTLE_ENDIAN or ByteOrder.BIG_ENDIAN
        Since:
        7.0