package stream
- Alphabetic
- Public
- All
Type Members
-
trait
Duplex
extends Object with Readable with Writable
A "duplex" stream is one that is both Readable and Writable, such as a TCP socket connection.
A "duplex" stream is one that is both Readable and Writable, such as a TCP socket connection.
Note that stream.Duplex is an abstract class designed to be extended with an underlying implementation of the stream._read(size) and stream._write(chunk, encoding, callback) methods as you would with a Readable or Writable stream class.
Since JavaScript doesn't have multiple prototypal inheritance, this class prototypally inherits from Readable, and then parasitically from Writable. It is thus up to the user to implement both the low-level stream._read(n) method as well as the low-level stream._write(chunk, encoding, callback) method on extension duplex classes.
- Annotations
- @RawJSType() @native()
-
trait
DuplexClass
extends Object
A "duplex" stream is one that is both Readable and Writable, such as a TCP socket connection.
A "duplex" stream is one that is both Readable and Writable, such as a TCP socket connection.
Note that stream.Duplex is an abstract class designed to be extended with an underlying implementation of the stream._read(size) and stream._write(chunk, encoding, callback) methods as you would with a Readable or Writable stream class.
Since JavaScript doesn't have multiple prototypal inheritance, this class prototypally inherits from Readable, and then parasitically from Writable. It is thus up to the user to implement both the low-level stream._read(n) method as well as the low-level stream._write(chunk, encoding, callback) method on extension duplex classes.
- Annotations
- @RawJSType() @native()
-
class
DuplexOptions
extends Object
Duplex Options
Duplex Options
- Annotations
- @RawJSType() @ScalaJSDefined()
-
trait
PassThrough
extends Object with Transform
This is a trivial implementation of a Transform stream that simply passes the input bytes across to the output.
This is a trivial implementation of a Transform stream that simply passes the input bytes across to the output. Its purpose is mainly for examples and testing, but there are occasionally use cases where it can come in handy as a building block for novel sorts of streams.
- Annotations
- @RawJSType() @native()
-
trait
Readable
extends Object with IEventEmitter
The Readable stream interface is the abstraction for a source of data that you are reading from.
The Readable stream interface is the abstraction for a source of data that you are reading from. In other words, data comes out of a Readable stream.
- Annotations
- @RawJSType() @native()
- Version
7.4.0
- See also
https://nodejs.org/api/stream.html#stream_readable_streams
-
trait
Stream
extends Object
Stream Type Definition
Stream Type Definition
- Annotations
- @RawJSType() @native()
-
trait
Transform
extends Object with Duplex
Transform streams are Duplex streams where the output is in some way computed from the input.
Transform streams are Duplex streams where the output is in some way computed from the input. They implement both the Readable and Writable interfaces.
- Annotations
- @RawJSType() @native()
-
trait
Writable
extends Object with IEventEmitter
The Writable stream interface is an abstraction for a destination that you are writing data to.
The Writable stream interface is an abstraction for a destination that you are writing data to.
- Annotations
- @RawJSType() @native()
Value Members
-
object
Duplex
extends Object with DuplexClass
- Annotations
- @native() @JSName( "Duplex" )
-
object
DuplexClass
Duplex Class Companion
-
object
Readable
Readable Companion
-
object
Stream
extends Object with Stream
A stream is an abstract interface for working with streaming data in Node.js.
A stream is an abstract interface for working with streaming data in Node.js. The stream module provides a base API that makes it easy to build objects that implement the stream interface.
There are many stream objects provided by Node.js. For instance, a request to an HTTP server and process.stdout are both stream instances.
Streams can be readable, writable, or both. All streams are instances of EventEmitter.
- Annotations
- @native() @JSImport( "stream" , JSImport.Namespace )
- Version
7.4.0
- See also
https://nodejs.org/api/stream.html#stream_stream
-
object
Writable
Writable Companion