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, writeToStream
public Path getPath()
public BinaryInput openCopy() throws java.io.IOException
openCopy
in interface BinaryInput
openCopy
in class ReadStreamInput
java.io.IOException
public long getLength()
public long seek(long offset, int whence)
BinaryStream
seek
in interface BinaryStream
seek
in class ReadStreamInput
public boolean lock(boolean shared, boolean block)
lock
in interface LockableStream
public boolean unlock()
unlock
in interface LockableStream
public Value stat()
BinaryStream
stat
in interface BinaryStream
stat
in class ReadStreamInput
public void close()
ReadStreamInput
close
in interface BinaryInput
close
in interface BinaryStream
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class ReadStreamInput
public void cleanup()
cleanup
in interface EnvCleanup
public java.lang.String toString()
toString
in class ReadStreamInput