| Modifier and Type | Class and Description |
|---|---|
static class |
OffheapFile.ValuePortability |
| Modifier and Type | Method and Description |
|---|---|
SeekableInputStream |
getInputStream()
Opens a stream for reading data from the file
|
String |
getName()
Returns the name of the file
|
SeekableOutputStream |
getOutputStream()
Opens a stream for writing data to a file.
|
long |
getSizeInBytes()
Returns the total size of the file in bytes
|
long |
lastModifiedTime()
Reports the last accessed or modified time for the file.
|
long |
length()
Reports the length of the file.
|
void |
setLastModifiedTime(long time)
Sets the last modified time for the file.
|
String |
toString() |
void |
truncate()
Erases the contents of the file and sets its length to 0
|
public long length()
throws IOException
Filelength in interface FileIOException - if an I/O error occurspublic long lastModifiedTime()
throws IOException
FilelastModifiedTime in interface FileIOException - if an I/O error occurs.public void setLastModifiedTime(long time)
throws IOException
FilesetLastModifiedTime in interface Filetime - the time to setIOException - if an I/O error occurs.public SeekableInputStream getInputStream() throws IOException
FilegetInputStream in interface FileIOException - if an error occurs while processing the request.public SeekableOutputStream getOutputStream() throws IOException
FilegetOutputStream in interface FileIOException - if an output stream is already open or if an I/O error occurs.public String getName()
Filepublic long getSizeInBytes()
FilegetSizeInBytes in interface Filepublic void truncate()
throws IOException
Filetruncate in interface FileIOException - if an I/O error occurs.Copyright © 2015–2024. All rights reserved.