Example #1
0
export var WritableStreamSource = function(source) {
  AxiomStream.call(this);

  /** @const @private @type {!StreamsSource} */
  this.source_ = source;

  /** @const @type {!AxiomEvent} */
  this.onFinish = source.onFinish;
};
Example #2
0
export var ReadableMemoryStream = function(buffer) {
  AxiomStream.call(this);
  /** @const @private @type {MemoryStreamBuffer} */
  this.buffer_ = buffer;
  /** @const @type {!AxiomEvent} */
  this.onData = buffer.onData;
  /** @const @type {!AxiomEvent} */
  this.onReadable = buffer.onReadable;
};
Example #3
0
export var ReadableStreamSource = function(source) {
  AxiomStream.call(this);

  /** @const @private @type {StreamsSource} */
  this.source_ = source;

  /** @const @type {!AxiomEvent} */
  this.onData = source.onData;
  /** @const @type {!AxiomEvent} */
  this.onReadable = source.onReadable;
  /** @const @type {!AxiomEvent} */
  this.onEnd = source.onEnd;
  /** @const @type {!AxiomEvent} */
  this.onClose = source.onClose;
};
export var WritableFileStreamBuffer = function(
    fileSystem, path, dataType, openMode) {
  AxiomStream.call(this);

  /** @const @type {!FileSystem} */
  this.fileSystem_ = fileSystem;
  /** @const @type {!Path} */
  this.path_ = path;
  /** @const @type {!DataType} */
  this.dataType_ = dataType;
  /** @const @type {!string|!OpenMode} */
  this.openMode_ = openMode;
  /** @const @type {!MemoryStream} */
  this.buffer_ = new MemoryStream();
  /** @const @type {!AxiomEvent} */
  this.onFinish = this.buffer_.onFinish;
};
Example #5
0
export var WritableMemoryStream = function(buffer) {
  AxiomStream.call(this);
  /** @const @private @type {MemoryStreamBuffer} */
  this.buffer_ = buffer;
};