Package org.apache.commons.io.input
Interface Tailer.Tailable
- 
- Enclosing class:
 - Tailer
 
public static interface Tailer.TailableA tailable resource like a file.- Since:
 - 2.12.0
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tailer.RandomAccessResourceBridgegetRandomAccess(java.lang.String mode)Creates a random access file stream to read.booleanisNewer(java.nio.file.attribute.FileTime fileTime)Tests if this tailable is newer than the specifiedFileTime.java.nio.file.attribute.FileTimelastModifiedFileTime()Gets the last modificationFileTime.longsize()Gets the size of this tailable. 
 - 
 
- 
- 
Method Detail
- 
getRandomAccess
Tailer.RandomAccessResourceBridge getRandomAccess(java.lang.String mode) throws java.io.FileNotFoundException
Creates a random access file stream to read.- Parameters:
 mode- the access mode, by default this is forRandomAccessFile.- Returns:
 - a random access file stream to read.
 - Throws:
 java.io.FileNotFoundException- if the tailable object does not exist.
 
- 
isNewer
boolean isNewer(java.nio.file.attribute.FileTime fileTime) throws java.io.IOExceptionTests if this tailable is newer than the specifiedFileTime.- Parameters:
 fileTime- the file time reference.- Returns:
 - true if the 
Fileexists and has been modified after the givenFileTime. - Throws:
 java.io.IOException- if an I/O error occurs.
 
- 
lastModifiedFileTime
java.nio.file.attribute.FileTime lastModifiedFileTime() throws java.io.IOExceptionGets the last modificationFileTime.- Returns:
 - See 
Files.getLastModifiedTime(Path, LinkOption...). - Throws:
 java.io.IOException- if an I/O error occurs.
 
- 
size
long size() throws java.io.IOException
Gets the size of this 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:
 java.io.IOException- if an I/O error occurs.
 
 - 
 
 -