T - @PublicSpi
public interface InputStreamConsumer<T>
InputStream.
Typical usage pattern for methods that accept a consumer is to pass in an anonymous implementation of this interface:
something.withConsumer(new InputStreamConsumer(){ | Modifier and Type | Method and Description |
|---|---|
T |
withInputStream(InputStream is) |
default T |
withInputStreamAndLength(InputStream is,
Long length)
Consume an
InputStream with an optional length provided. |
T withInputStream(InputStream is) throws IOException
IOExceptiondefault T withInputStreamAndLength(@Nonnull InputStream is, @Nullable Long length) throws IOException
InputStream with an optional length provided.is - the InputStream to consumelength - the length of the stream in bytes, if knownIOExceptionCopyright © 2002-2024 Atlassian. All Rights Reserved.