Package org.aksw.commons.io.input
Class ReadableChannelOverIterator<T>
java.lang.Object
org.aksw.commons.util.closeable.AutoCloseableBase
org.aksw.commons.util.closeable.AutoCloseableWithLeakDetectionBase
org.aksw.commons.io.shared.ChannelBase
org.aksw.commons.io.input.ReadableChannelBase<T[]>
org.aksw.commons.io.input.ReadableChannelOverIterator<T>
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,HasArrayOps<T[]>,ReadableChannel<T[]>,ReadableSource<T[]>
-
Field Summary
FieldsFields inherited from class org.aksw.commons.util.closeable.AutoCloseableWithLeakDetectionBase
instantiationStackTraceFields inherited from class org.aksw.commons.util.closeable.AutoCloseableBase
closeStackTrace, enableCloseStackTrace, isClosed -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintRead method following the usual InputStream protocol.voidsetCloseAction(Runnable closeAction) toStream()Returns this channel as a stream - closing the stream closes this channelMethods inherited from class org.aksw.commons.io.shared.ChannelBase
isOpenMethods inherited from class org.aksw.commons.util.closeable.AutoCloseableWithLeakDetectionBase
finalize, getInstantiationStackTraceMethods inherited from class org.aksw.commons.util.closeable.AutoCloseableBase
close, ensureOpen, throwClosedExceptionMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.commons.io.input.ReadableSource
readRaw
-
Field Details
-
arrayOps
-
iterator
-
closeAction
-
-
Constructor Details
-
ReadableChannelOverIterator
-
-
Method Details
-
setCloseAction
-
toStream
Returns this channel as a stream - closing the stream closes this channel -
getIterator
-
closeActual
- Overrides:
closeActualin classAutoCloseableBase- Throws:
IOException
-
read
Description copied from interface:ReadableSourceRead method following the usual InputStream protocol.- 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
-
getArrayOps
-