@Public public interface FileIOChannel
Modifier and Type | Interface and Description |
---|---|
static class |
FileIOChannel.Enumerator
An enumerator for channels that logically belong together.
|
static class |
FileIOChannel.ID
An ID identifying an underlying file channel.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the channel.
|
void |
closeAndDelete()
Closes the channel and deletes the underlying file.
|
void |
deleteChannel()
Deletes the file underlying this I/O channel.
|
FileIOChannel.ID |
getChannelID()
Gets the channel ID of this I/O channel.
|
FileChannel |
getNioFileChannel() |
long |
getSize()
Gets the size (in bytes) of the file underlying the channel.
|
boolean |
isClosed()
Checks whether the channel has been closed.
|
FileIOChannel.ID getChannelID()
long getSize() throws IOException
IOException
boolean isClosed()
void close() throws IOException
IOException
- Thrown, if an error occurred while waiting for pending requests.void deleteChannel()
IllegalStateException
- Thrown, when the channel is still open.FileChannel getNioFileChannel()
void closeAndDelete() throws IOException
IOException
- Thrown, if an error occurred while waiting for pending requests.Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.