Package org.apache.commons.io
Class IORandomAccessFile
java.lang.Object
java.io.RandomAccessFile
org.apache.commons.io.IORandomAccessFile
- All Implemented Interfaces:
Closeable
,DataInput
,DataOutput
,AutoCloseable
- Since:
- 2.18.0
- See Also:
-
Constructor Summary
ConstructorDescriptionIORandomAccessFile
(File file, String mode) Constructs a new instance by callingRandomAccessFile(File, String)
.IORandomAccessFile
(String name, String mode) Constructs a new instance by callingRandomAccessFile(String, String)
. -
Method Summary
Modifier and TypeMethodDescriptiongetFile()
Gets the file passed toIORandomAccessFile(File, String)
.getMode()
Gets the mode passed toIORandomAccessFile(File, 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
-
Constructor Details
-
IORandomAccessFile
Constructs a new instance by callingRandomAccessFile(File, String)
.- Parameters:
file
- the file objectmode
- the access mode, as described inRandomAccessFile(File, String)
.- Throws:
FileNotFoundException
- Thrown byRandomAccessFile(File, String)
.- See Also:
-
IORandomAccessFile
Constructs a new instance by callingRandomAccessFile(String, String)
.- Parameters:
name
- the file objectmode
- the access mode, as described inRandomAccessFile(String, String)
.- Throws:
FileNotFoundException
- Thrown byRandomAccessFile(String, String)
.- See Also:
-
-
Method Details
-
getFile
Gets the file passed toIORandomAccessFile(File, String)
.- Returns:
- the file passed to
IORandomAccessFile(File, String)
.
-
getMode
Gets the mode passed toIORandomAccessFile(File, String)
.- Returns:
- the mode passed to
IORandomAccessFile(File, String)
.
-
toString
Returns the pathname string of this abstract pathname. This is just the string returned by theFile.toString()
method.
-