Package org.apache.commons.io.input
Class Tailer.TailablePath
java.lang.Object
org.apache.commons.io.input.Tailer.TailablePath
- All Implemented Interfaces:
Tailer.Tailable
- Enclosing class:
Tailer
A tailable for a file
Path.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) PathgetPath()getRandomAccess(String mode) Creates a random access file stream to read.booleanTests if this tailable is newer than the specifiedFileTime.Gets the last modificationFileTime.longsize()Gets the size of this tailable.toString()
-
Field Details
-
path
-
linkOptions
-
-
Constructor Details
-
TailablePath
-
-
Method Details
-
getPath
Path getPath() -
getRandomAccess
Description copied from interface:Tailer.TailableCreates a random access file stream to read.- Specified by:
getRandomAccessin interfaceTailer.Tailable- Parameters:
mode- the access mode, by default this is forRandomAccessFile.- Returns:
- a random access file stream to read.
- Throws:
FileNotFoundException- if the tailable object does not exist.
-
isNewer
Description copied from interface:Tailer.TailableTests if this tailable is newer than the specifiedFileTime.- Specified by:
isNewerin interfaceTailer.Tailable- Parameters:
fileTime- the file time reference.- Returns:
- true if the
Fileexists and has been modified after the givenFileTime. - Throws:
IOException- if an I/O error occurs.
-
lastModifiedFileTime
Description copied from interface:Tailer.TailableGets the last modificationFileTime.- Specified by:
lastModifiedFileTimein interfaceTailer.Tailable- Returns:
- See
Files.getLastModifiedTime(Path, LinkOption...). - Throws:
IOException- if an I/O error occurs.
-
size
Description copied from interface:Tailer.TailableGets the size of this tailable.- Specified by:
sizein interfaceTailer.Tailable- Returns:
- The size, in bytes, of this tailable, or
0if the file does not exist. Some operating systems may return0for path names denoting system-dependent entities such as devices or pipes. - Throws:
IOException- if an I/O error occurs.
-
toString
-