stringdecoder.write()

decoder.write(buffer) Returns a decoded string.

stringdecoder.end()

decoder.end() Returns any trailing bytes that were left in the buffer.

StringDecoder

Class: StringDecoder Accepts a single argument, encoding which defaults to 'utf8'.

stream.Writable

Class: stream.Writable stream.Writable is an abstract class designed to be extended with an underlying implementation of the stream._write(chunk, encoding, callback) method. Please see API for Stream Consumers for how to consume writable streams in your programs. What follows is an explanation of how to implement Writable streams in your programs. new stream.Writable([options]) options <Object> highWaterMark <Number> Buffer level when stream.write() starts returning false. Defau

stream.Writable

Class: stream.Writable The Writable stream interface is an abstraction for a destination that you are writing data to. Examples of writable streams include: HTTP requests, on the client HTTP responses, on the server fs write streams zlib streams crypto streams TCP sockets child process stdin process.stdout, process.stderr Event: 'drain' If a stream.write(chunk) call returns false, then the 'drain' event will indicate when it is appropriate to begin writing more data to the stream. // Wri

stream.Transform

Class: stream.Transform A "transform" stream is a duplex stream where the output is causally connected in some way to the input, such as a zlib stream or a crypto stream. There is no requirement that the output be the same size as the input, the same number of chunks, or arrive at the same time. For example, a Hash stream will only ever have a single chunk of output which is provided when the input is ended. A zlib stream will produce output that is either much smaller or much larger than its

stream.Transform

Class: stream.Transform Transform streams are Duplex streams where the output is in some way computed from the input. They implement both the Readable and Writable interfaces. Examples of Transform streams include: zlib streams crypto streams

stream.Readable

Class: stream.Readable stream.Readable is an abstract class designed to be extended with an underlying implementation of the stream._read(size) method. Please see API for Stream Consumers for how to consume streams in your programs. What follows is an explanation of how to implement Readable streams in your programs. new stream.Readable([options]) options <Object> highWaterMark <Number> The maximum number of bytes to store in the internal buffer before ceasing to read from the u

stream.Readable

Class: stream.Readable 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. A Readable stream will not start emitting data until you indicate that you are ready to receive it. Readable streams have two "modes": a flowing mode and a paused mode. When in flowing mode, data is read from the underlying system and provided to your program as fast as possible. In paused mode, you must explicitly call st

stream.read()

stream.read(0) There are some cases where you want to trigger a refresh of the underlying readable stream mechanisms, without actually consuming any data. In that case, you can call stream.read(0), which will always return null. If the internal read buffer is below the highWaterMark, and the stream is not currently reading, then calling stream.read(0) will trigger a low-level stream._read() call. There is almost never a need to do this. However, you will see some cases in Node.js's internals