Package net.sansa_stack.rdf.benchmark.io
Class ReadableByteChannelFromIterator
- java.lang.Object
-
- net.sansa_stack.rdf.benchmark.io.ReadableByteChannelFromIterator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ReadableByteChannel
public class ReadableByteChannelFromIterator extends Object implements ReadableByteChannel
-
-
Field Summary
Fields Modifier and Type Field Description protected ByteBuffercurrentBufferprotected booleanisOpenprotected Iterator<ByteBuffer>it
-
Constructor Summary
Constructors Constructor Description ReadableByteChannelFromIterator(Iterator<ByteBuffer> it)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisOpen()static voidmain(String[] args)intread(ByteBuffer dst)static InputStreamtoInputStream(Iterator<String> it)static InputStreamtoInputStream(Stream<String> stream)
-
-
-
Field Detail
-
it
protected Iterator<ByteBuffer> it
-
isOpen
protected boolean isOpen
-
currentBuffer
protected ByteBuffer currentBuffer
-
-
Constructor Detail
-
ReadableByteChannelFromIterator
public ReadableByteChannelFromIterator(Iterator<ByteBuffer> it)
-
-
Method Detail
-
main
public static void main(String[] args)
-
toInputStream
public static InputStream toInputStream(Iterator<String> it)
-
toInputStream
public static InputStream toInputStream(Stream<String> stream)
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
read
public int read(ByteBuffer dst)
- Specified by:
readin interfaceReadableByteChannel
-
-