Class IORandomAccessFile

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

    public final class IORandomAccessFile
    extends java.io.RandomAccessFile
    Extends RandomAccessFile to provide access to the File and mode passed on construction.
    Since:
    2.18.0
    See Also:
    RandomAccessFile, RandomAccessFileMode
    • Constructor Summary

      Constructors 
      Constructor Description
      IORandomAccessFile​(java.io.File file, java.lang.String mode)
      Constructs a new instance by calling RandomAccessFile(File, String).
      IORandomAccessFile​(java.lang.String name, java.lang.String mode)
      Constructs a new instance by calling RandomAccessFile(String, String).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File getFile()
      Gets the file passed to IORandomAccessFile(File, String).
      java.lang.String getMode()
      Gets the mode passed to IORandomAccessFile(File, String).
      java.lang.String toString()
      Returns the pathname string of this abstract pathname.
      • Methods inherited from class java.io.RandomAccessFile

        close, getChannel, getFD, getFilePointer, length, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, 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, wait, wait, wait
    • Constructor Detail

      • IORandomAccessFile

        public IORandomAccessFile​(java.io.File file,
                                  java.lang.String mode)
                           throws java.io.FileNotFoundException
        Constructs a new instance by calling RandomAccessFile(File, String).
        Parameters:
        file - the file object
        mode - the access mode, as described in RandomAccessFile(File, String).
        Throws:
        java.io.FileNotFoundException - Thrown by RandomAccessFile(File, String).
        See Also:
        RandomAccessFile(File, String)
      • IORandomAccessFile

        public IORandomAccessFile​(java.lang.String name,
                                  java.lang.String mode)
                           throws java.io.FileNotFoundException
        Constructs a new instance by calling RandomAccessFile(String, String).
        Parameters:
        name - the file object
        mode - the access mode, as described in RandomAccessFile(String, String).
        Throws:
        java.io.FileNotFoundException - Thrown by RandomAccessFile(String, String).
        See Also:
        RandomAccessFile(String, String)