public class S3ReadOnlySeekableByteChannel extends Object implements SeekableByteChannel
| Constructor and Description |
|---|
S3ReadOnlySeekableByteChannel(S3Path path,
Set<? extends OpenOption> options)
Open or creates a file, returning a seekable byte channel
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
long |
position() |
SeekableByteChannel |
position(long targetPosition) |
int |
read(ByteBuffer dst) |
long |
size() |
SeekableByteChannel |
truncate(long size) |
int |
write(ByteBuffer src) |
public S3ReadOnlySeekableByteChannel(S3Path path, Set<? extends OpenOption> options) throws IOException
path - the path open or createoptions - options specifying how the file is openedIOException - if an I/O error occurspublic long position()
position in interface SeekableByteChannelpublic SeekableByteChannel position(long targetPosition) throws IOException
position in interface SeekableByteChannelIOExceptionpublic int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelread in interface SeekableByteChannelIOExceptionpublic SeekableByteChannel truncate(long size)
truncate in interface SeekableByteChannelpublic int write(ByteBuffer src)
write in interface SeekableByteChannelwrite in interface WritableByteChannelpublic long size()
size in interface SeekableByteChannelpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionCopyright © 2018. All rights reserved.