Package org.angular.ts.ng
Interface StreamService
@JsType(isNative=true,
name="ng.StreamService",
namespace="<global>")
public interface StreamService
Public AngularTS StreamService contract exposed through the global ng namespace for Closure-annotated applications.
-
Method Summary
Modifier and TypeMethodDescriptionelemental2.promise.Promise<Void> consumeJsonLines(elemental2.dom.ReadableStream<elemental2.core.Uint8Array> stream, Object options) Decodes newline-delimited JSON without retaining parsed values.elemental2.promise.Promise<Void> consumeText(elemental2.dom.ReadableStream<elemental2.core.Uint8Array> stream, Object options) Decodes a byte stream and calls `onChunk` without retaining decoded text.booleanisReadableStream(Object value) Returns true when a value is a native readable byte stream.<T> elemental2.promise.Promise<elemental2.core.JsArray<T>> readJsonLines(elemental2.dom.ReadableStream<elemental2.core.Uint8Array> stream, Object options) Decodes newline-delimited JSON and returns all parsed values.elemental2.promise.Promise<elemental2.core.JsArray<String>> Decodes a byte stream and emits complete lines.elemental2.promise.Promise<String> Decodes a byte stream into text chunks.
-
Method Details
-
consumeJsonLines
elemental2.promise.Promise<Void> consumeJsonLines(elemental2.dom.ReadableStream<elemental2.core.Uint8Array> stream, Object options) Decodes newline-delimited JSON without retaining parsed values.- Parameters:
stream- Value supplied for the stream parameter.options- Value supplied for the options parameter.- Returns:
- Method result.
-
consumeText
elemental2.promise.Promise<Void> consumeText(elemental2.dom.ReadableStream<elemental2.core.Uint8Array> stream, Object options) Decodes a byte stream and calls `onChunk` without retaining decoded text.- Parameters:
stream- Value supplied for the stream parameter.options- Value supplied for the options parameter.- Returns:
- Method result.
-
isReadableStream
Returns true when a value is a native readable byte stream.- Parameters:
value- Value supplied for the value parameter.- Returns:
- Method result.
-
readJsonLines
<T> elemental2.promise.Promise<elemental2.core.JsArray<T>> readJsonLines(elemental2.dom.ReadableStream<elemental2.core.Uint8Array> stream, Object options) Decodes newline-delimited JSON and returns all parsed values.- Parameters:
stream- Value supplied for the stream parameter.options- Value supplied for the options parameter.- Returns:
- Method result.
-
readLines
elemental2.promise.Promise<elemental2.core.JsArray<String>> readLines(elemental2.dom.ReadableStream<elemental2.core.Uint8Array> stream, Object options) Decodes a byte stream and emits complete lines.- Parameters:
stream- Value supplied for the stream parameter.options- Value supplied for the options parameter.- Returns:
- Method result.
-
readText
elemental2.promise.Promise<String> readText(elemental2.dom.ReadableStream<elemental2.core.Uint8Array> stream, Object options) Decodes a byte stream into text chunks.- Parameters:
stream- Value supplied for the stream parameter.options- Value supplied for the options parameter.- Returns:
- Method result.
-