Package com.helger.io.resource.inmemory
Class ReadableResourceInputStream
java.lang.Object
com.helger.io.resource.inmemory.AbstractMemoryReadableResource
com.helger.io.resource.inmemory.ReadableResourceInputStream
- All Implemented Interfaces:
com.helger.base.io.iface.IHasInputStream,com.helger.base.io.iface.IHasInputStreamAndReader,IMemoryReadableResource,IReadableResource,IResourceBase
An in-memory
IReadableResource based on an InputStream.- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionReadableResourceInputStream(@Nullable String sResourceID, @NonNull InputStream aIS) Constructor to use. -
Method Summary
Methods inherited from class com.helger.io.resource.inmemory.AbstractMemoryReadableResource
exists, getAsFile, getAsURL, getPath, getReadableCloneForPath, getResourceID, setPathMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.base.io.iface.IHasInputStream
getBufferedInputStream, withBufferedInputStreamDo, withInputStreamDoMethods inherited from interface com.helger.base.io.iface.IHasInputStreamAndReader
getBufferedReader, getReader
-
Constructor Details
-
ReadableResourceInputStream
public ReadableResourceInputStream(@Nullable String sResourceID, @WillNotClose @NonNull InputStream aIS) Constructor to use.- Parameters:
sResourceID- The unique resource ID, used as the caching key.aIS- The InputStream to read from. May not benull. This Stream is NOT closed by this class.
-
-
Method Details
-
getInputStream
-
isReadMultiple
public final boolean isReadMultiple()- Returns:
- Always
falsesince an input stream can only be read once.
-
toString
- Overrides:
toStringin classAbstractMemoryReadableResource
-