A simple interface for objects that provide an InputStream.
This abstraction is useful for generic access to stream-based content (e.g., files, network streams, in-memory data) without tying the implementation to a specific resource type.
It is typically used in configuration loaders, template resolvers, or file/resource access APIs.
Example Usage
class FileInputStreamSource implements InputStreamSource {
final File file;
FileInputStreamSource(this.file);
@override
InputStream getInputStream() {
return FileInputStream(file);
}
}
In JetLeaf, this is a core abstraction used to generalize resource access.
- Implementers
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getInputStream(
) → InputStream - Returns a new InputStream to read the underlying content.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited