InputStream class

Inheritance

Constructors

InputStream(List<int> data)
InputStream.fromString(String data)

Properties

data List<int>
getter/setter pair
decodeToUnicodeCodePoints bool
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
index int
Return the index into the stream of the input symbol referred to by {@code LA(1)}.
no setteroverride
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
Returns the total number of symbols in the stream, including a single EOF symbol.
no setteroverride
sourceName String
Gets the name of the underlying symbol source. This method returns a non-null, non-empty string. If such a name is not known, this method returns {@link #UNKNOWN_SOURCE_NAME}.
no setteroverride

Methods

consume() → void
Consumes the current symbol in the stream. This method has the following effects:
override
getText(Interval interval) String
This method returns the text for a range of characters within this input stream. This method is guaranteed to not throw an exception if the specified interval lies entirely within a marked range. For more information about marked ranges, see {@link IntStream#mark}.
override
LA(int offset) int
Gets the value of the symbol at offset i from the current position. When {@code i==1}, this method returns the value of the current symbol in the stream (which is the next symbol to be consumed). When {@code i==-1}, this method returns the value of the previously read symbol in the stream. It is not valid to call this method with {@code i==0}, but the specific behavior is unspecified because this method is frequently called from performance-critical code.
override
mark() int
mark/release do nothing; we have entire buffer
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release(int marker) → void
This method releases a marked range created by a call to {@link #mark mark()}. Calls to {@code release()} must appear in the reverse order of the corresponding calls to {@code mark()}. If a mark is released twice, or if marks are not released in reverse order of the corresponding calls to {@code mark()}, the behavior is unspecified.
override
reset() → void
Reset the stream so that it's in the same state it was when the object was created except the data array is not touched.
seek(int _index) → void
consume() ahead until p==_index; can't just set p=_index as we must update line and column. If we seek backwards, just set p
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromPath(String path, {Encoding encoding = utf8}) Future<InputStream>
fromStream(Stream<List<int>> stream, {Encoding encoding = utf8}) Future<InputStream>
fromStringStream(Stream<String> stream) Future<InputStream>