Package org.apache.lucene.tests.mockfile
Class FilterSeekableByteChannel
java.lang.Object
org.apache.lucene.tests.mockfile.FilterSeekableByteChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,ReadableByteChannel,SeekableByteChannel,WritableByteChannel
A
FilterSeekableByteChannel contains another SeekableByteChannel, which it uses
as its basic source of data, possibly transforming the data along the way or providing additional
functionality.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SeekableByteChannelThe underlyingSeekableByteChannelinstance. -
Constructor Summary
ConstructorsConstructorDescriptionFilterSeekableByteChannel(SeekableByteChannel delegate) Construct aFilterSeekableByteChannelbased on the specified base channel. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanisOpen()longposition()position(long newPosition) intread(ByteBuffer dst) longsize()truncate(long size) intwrite(ByteBuffer src)
-
Field Details
-
delegate
The underlyingSeekableByteChannelinstance.
-
-
Constructor Details
-
FilterSeekableByteChannel
Construct aFilterSeekableByteChannelbased on the specified base channel.Note that base channel is closed if this channel is closed.
- Parameters:
delegate- specified base channel.
-
-
Method Details
-
isOpen
public boolean isOpen() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
read
- Specified by:
readin interfaceReadableByteChannel- Specified by:
readin interfaceSeekableByteChannel- Throws:
IOException
-
write
- Specified by:
writein interfaceSeekableByteChannel- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
position
- Specified by:
positionin interfaceSeekableByteChannel- Throws:
IOException
-
position
- Specified by:
positionin interfaceSeekableByteChannel- Throws:
IOException
-
size
- Specified by:
sizein interfaceSeekableByteChannel- Throws:
IOException
-
truncate
- Specified by:
truncatein interfaceSeekableByteChannel- Throws:
IOException
-