@Immutable public class HasInputStream extends Object implements IHasInputStream
IHasInputStream with that has an
InputStream supplier that can be read more than once!| Constructor and Description |
|---|
HasInputStream(ISupplier<? extends InputStream> aISP,
boolean bReadMultiple) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
Get the input stream to read from the object.
|
boolean |
isReadMultiple()
Check if the
InputStream from IHasInputStream.getInputStream() can be
acquired more than once. |
static HasInputStream |
multiple(ISupplier<? extends InputStream> aISP) |
static HasInputStream |
once(ISupplier<? extends InputStream> aISP) |
String |
toString() |
public HasInputStream(@Nonnull ISupplier<? extends InputStream> aISP, boolean bReadMultiple)
public final boolean isReadMultiple()
IHasInputStreamInputStream from IHasInputStream.getInputStream() can be
acquired more than once.isReadMultiple in interface IHasInputStreamtrue if the input stream can be acquired more than
once, false if not.public final InputStream getInputStream()
IHasInputStreamInputStream needs to be created!getInputStream in interface IHasInputStreamnull if resolving failed.@Nonnull @ReturnsMutableCopy public static HasInputStream multiple(@Nonnull ISupplier<? extends InputStream> aISP)
@Nonnull @ReturnsMutableCopy public static HasInputStream once(@Nonnull ISupplier<? extends InputStream> aISP)
Copyright © 2014–2017 Philip Helger. All rights reserved.