Package com.helger.commons.io
Interface IHasInputStream
-
- All Known Subinterfaces:
IHasByteArray,IHasInputStreamAndReader,IMemoryReadableResource,IReadableResource,IReadWriteResource,IWrappedReadableResource
- All Known Implementing Classes:
AbstractMemoryReadableResource,AbstractWrappedReadableResource,ByteArrayInputStreamProvider,ByteArrayWrapper,ByteBufferInputStreamProvider,CharsetHelper.InputStreamAndCharset,ClassPathResource,FileSystemResource,GZIPReadableResource,HasInputStream,ReadableResourceByteArray,ReadableResourceInputStream,ReadableResourceString,StringInputStreamProvider,URLResource
public interface IHasInputStreamA callback interface to retrieveInputStreamobjects.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default InputStreamgetBufferedInputStream()Get a buffered input stream to read from the object.InputStreamgetInputStream()Get the input stream to read from the object.booleanisReadMultiple()Check if theInputStreamfromgetInputStream()andgetBufferedInputStream()can be acquired more than once.
-
-
-
Method Detail
-
getInputStream
@Nullable InputStream getInputStream()
Get the input stream to read from the object. Each time this method is called, a newInputStreamneeds to be created.- Returns:
nullif resolving failed.
-
getBufferedInputStream
@Nullable default InputStream getBufferedInputStream()
Get a buffered input stream to read from the object. Each time this method is called, a newInputStreamneeds to be created. Internally invokesgetInputStream().- Returns:
nullif resolving failed.- Since:
- 9.1.8
-
isReadMultiple
boolean isReadMultiple()
Check if theInputStreamfromgetInputStream()andgetBufferedInputStream()can be acquired more than once.- Returns:
trueif the input stream can be acquired more than once,falseif not.
-
-