- java.lang.Object
-
- io.helidon.media.common.InputStreamBodyReader
-
- All Implemented Interfaces:
MessageBodyOperator<MessageBodyReaderContext>,MessageBodyReader<InputStream>
public class InputStreamBodyReader extends Object implements MessageBodyReader<InputStream>
Message body reader forInputStream.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(GenericType<?> type, MessageBodyReaderContext context)Test if the operator can convert the given type.static InputStreamBodyReadercreate()Create a new instance ofInputStreamBodyReader.<U extends InputStream>
Single<U>read(Flow.Publisher<DataChunk> publisher, GenericType<U> type, MessageBodyReaderContext context)Convert a HTTP payload into a Single publisher of the given type.
-
-
-
Method Detail
-
accept
public boolean accept(GenericType<?> type, MessageBodyReaderContext context)
Description copied from interface:MessageBodyOperatorTest if the operator can convert the given type.- Specified by:
acceptin interfaceMessageBodyOperator<MessageBodyReaderContext>- Parameters:
type- the requested typecontext- the context providing the headers abstraction- Returns:
trueif the operator can convert the specified type in the given context,falseotherwise
-
read
public <U extends InputStream> Single<U> read(Flow.Publisher<DataChunk> publisher, GenericType<U> type, MessageBodyReaderContext context)
Description copied from interface:MessageBodyReaderConvert a HTTP payload into a Single publisher of the given type.- Specified by:
readin interfaceMessageBodyReader<InputStream>- Type Parameters:
U- actual requested type parameter- Parameters:
publisher- HTTP payloadtype- requested typecontext- the context providing the headers abstraction- Returns:
- Single publisher
-
create
public static InputStreamBodyReader create()
Create a new instance ofInputStreamBodyReader.- Returns:
InputStreammessage body reader.
-
-