public class FileInput extends ReadStreamInput implements LockableStream, EnvCleanup
SEEK_CUR, SEEK_END, SEEK_SET| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Implements the EnvCleanup interface.
|
void |
close()
Closes the file.
|
long |
getLength()
Returns the number of bytes available to be read, 0 if not known.
|
Path |
getPath()
Returns the path.
|
boolean |
lock(boolean shared,
boolean block)
Lock the shared advisory lock.
|
BinaryInput |
openCopy()
Opens a copy.
|
long |
seek(long offset,
int whence)
Seek according to offset and whence.
|
Value |
stat()
Returns an array filled with stat information.
|
java.lang.String |
toString()
Converts to a string.
|
boolean |
unlock()
Unlock the advisory lock.
|
appendTo, closeRead, getAvailable, getInputStream, getPosition, getResourceType, init, isEOF, read, read, read, read, readLine, readOptionalLinefeed, setEncoding, setPosition, toJavaObject, unread, writeToStreampublic Path getPath()
public BinaryInput openCopy() throws java.io.IOException
openCopy in interface BinaryInputopenCopy in class ReadStreamInputjava.io.IOExceptionpublic long getLength()
public long seek(long offset,
int whence)
BinaryStreamseek in interface BinaryStreamseek in class ReadStreamInputpublic boolean lock(boolean shared,
boolean block)
lock in interface LockableStreampublic boolean unlock()
unlock in interface LockableStreampublic Value stat()
BinaryStreamstat in interface BinaryStreamstat in class ReadStreamInputpublic void close()
ReadStreamInputclose in interface BinaryInputclose in interface BinaryStreamclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class ReadStreamInputpublic void cleanup()
cleanup in interface EnvCleanuppublic java.lang.String toString()
toString in class ReadStreamInput