Class ReadableChannelLocking<A, X extends ReadableChannel<A>>
java.lang.Object
org.aksw.commons.util.closeable.AutoCloseableWrapperBase<X>
org.aksw.commons.io.shared.ChannelDecoratorBase<X>
org.aksw.commons.io.input.ReadableChannelDecoratorBase<A,X>
org.aksw.commons.io.input.ReadableChannelLocking<A,X>
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, HasArrayOps<A>, ReadableChannel<A>, ReadableSource<A>
- Direct Known Subclasses:
ReadableChannelSwitchableBase, SeekableReadableChannelLocking
public class ReadableChannelLocking<A, X extends ReadableChannel<A>>
extends ReadableChannelDecoratorBase<A,X>
-
Field Summary
FieldsFields inherited from class AutoCloseableWrapperBase
delegate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintOverride if any actions are needed; make sure to eventually call base.read()Methods inherited from class ReadableChannelDecoratorBase
getArrayOpsMethods inherited from class ChannelDecoratorBase
close, isOpenMethods inherited from class AutoCloseableWrapperBase
close, getDelegateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ReadableSource
readRaw
-
Field Details
-
rwl
-
-
Constructor Details
-
ReadableChannelLocking
-
-
Method Details
-
read
Override if any actions are needed; make sure to eventually call base.read()- Specified by:
readin interfaceReadableSource<A>- Overrides:
readin classReadableChannelDecoratorBase<A, X extends ReadableChannel<A>>- Parameters:
array- The array into which to put the read dataposition- Offset into array where to start writinglength- Maximum number of items to read.- Returns:
- The number of items read. Return -1 if end of data was reached, and 0 iff length was 0.
- Throws:
IOException
-
getReadWriteLock
-