Package software.amazon.nio.spi.s3
Class S3DirectReadableByteChannel
- java.lang.Object
-
- software.amazon.nio.spi.s3.S3DirectReadableByteChannel
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.ReadableByteChannel
public class S3DirectReadableByteChannel extends java.lang.Object implements java.nio.channels.ReadableByteChannelA delegate to provide byte reading from S3 to the delegatingS3SeekableByteChannel. As reads are made on behalf of thedelegatorthis class will update the delegatorspositionappropriately.
-
-
Constructor Summary
Constructors Constructor Description S3DirectReadableByteChannel(S3Path path, software.amazon.awssdk.services.s3.S3Client client, S3SeekableByteChannel delegator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()No op, this channel doesn't close as there are no resources to release.booleanisOpen()This channel is always openintread(java.nio.ByteBuffer dst)
-
-
-
Constructor Detail
-
S3DirectReadableByteChannel
public S3DirectReadableByteChannel(S3Path path, software.amazon.awssdk.services.s3.S3Client client, S3SeekableByteChannel delegator)
-
-
Method Detail
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException- Specified by:
readin interfacejava.nio.channels.ReadableByteChannel- Throws:
java.io.IOException
-
isOpen
public boolean isOpen()
This channel is always open- Specified by:
isOpenin interfacejava.nio.channels.Channel
-
close
public void close()
No op, this channel doesn't close as there are no resources to release.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.nio.channels.Channel- Specified by:
closein interfacejava.io.Closeable
-
-