Class DynamicInputFromStream
java.lang.Object
org.aksw.vshell.registry.InputBase
org.aksw.vshell.registry.DynamicInputFromStream
- All Implemented Interfaces:
Closeable, AutoCloseable, DynamicInput, Input
Input that can "upgrade" to transfer data to an intermediate pipe and read from there instead.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InputStreamprotected Objectprotected PosixPipeprotected CompletableFuture<?> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getFile()Return a file (typically a pipe).booleanhasFile()static DynamicInputFromStreamof(InputStream coreInput) protected voidupgrade()Methods inherited from class InputBase
getReaderCharset, hasReader, inputStream, reader, reader, transferToMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Input
getReaderCharset, hasReader, inputStream, reader, reader, transferTo
-
Field Details
-
coreInput
-
pipe
-
pumpFuture
-
lock
-
-
Constructor Details
-
DynamicInputFromStream
-
-
Method Details
-
openInputStream
- Specified by:
openInputStreamin classInputBase- Throws:
IOException
-
of
-
hasFile
public boolean hasFile()- Specified by:
hasFilein interfaceDynamicInput
-
getFile
Description copied from interface:DynamicInputReturn a file (typically a pipe). Calling this function may be create the pipe on-demand, hence the IOException. UseDynamicInput.hasFile()to check for file backing without on-demand creation.- Specified by:
getFilein interfaceDynamicInput- Throws:
IOException
-
upgrade
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputBase- Throws:
IOException
-