Methods from Stream
510933
function (name, callback) {
    var self = this;

    if (!self.callbacks[name])
      self.callbacks[name] = [callback];
    else
      self.callbacks[name].push(callback);
  }
59198
public void writeToStream(OutputStream stream, Object object) throws SerializationException {
        try {
            mapper.writeValue(stream, object);
        } catch (IOException ex) {
            throw new SerializationException("Exception during serialization", ex);
        }
    }
299952
def from_stream(cls, stream, offset):
        
        ifd_parser = _IfdParser(stream, offset)
        entries = dict((e.tag, e.value) for e in ifd_parser.iter_entries())
        return cls(entries)
307939
def _from_stream(cls, stream, blob, filename=None):
        
        image_header = _ImageHeaderFactory(stream)
        if filename is None:
            filename = 'image.%s' % image_header.default_ext
        return cls(blob, filename, image_header)
1316240
@Override
  public StreamImpl stream()
    throws IOException
  {
    if (_stream == null) {
      _stream = new JniStream(this);
    }

    _stream.init();

    return _stream;
  }
82510
function collect(stream, encoding, cb = () => {}) {
  if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  return stream
    .pipe(new Collect({ encoding, objectMode: stream._readableState.objectMode }))
    .collect()
    .then((data) => {
      cb(null, data);
      return data;
    })
    .catch((e) => {
      cb(e);
      throw e;
    });
}
688492
public static <T> CloseableIterable<T> fromStream(Stream<T> stream) {
        return wrap(stream::iterator, stream);
    }
105520
def stream=(stream)
      logger = Logger.new(stream)
      logger.level = @logger.level
      logger.formatter = @logger.formatter
      @logger = logger
    end
969774
def from_stream(cls, stream):
        
        marker_parser = _MarkerParser.from_stream(stream)
        markers = []
        for marker in marker_parser.iter_markers():
            markers.append(marker)
            if marker.marker_code == JPEG_MARKER_CODE.SOS:
                break
        return cls(markers)
1360723
@Override
  public StreamImpl stream()
    throws IOException
  {
    if (_streamImpl == null) {
      _streamImpl = new SocketStream();
    }

    _streamImpl.init(_s);

    return _streamImpl;
  }
167653
def load_into_collection_from_stream(collection, stream, content_type):
    
    rpr = as_representer(collection, content_type)
    with stream:
        data_el = rpr.data_from_stream(stream)
    rpr.resource_from_data(data_el, resource=collection)
1035515
function (what, method) { var el = this, method = _.find (arguments, _.isFunction)

            /*  See useless/base/dynamic/stream.js for that queue/queuedBy interface.
             */
            if (method.queuedBy) {
                method.queuedBy.push ({ remove: function () { el.off (what, method) } }) }

            /*  Call original impl.
             */
            return __previousMethods__.on.apply (this, arguments) }
469523
public static <T> List<T> toList(BaseStream<T, ? extends BaseStream> stream) {
        return StreamSupport.stream(
                        Spliterators.spliteratorUnknownSize(stream.iterator(), Spliterator.ORDERED),
                false).collect(Collectors.<T>toList());
    }
1072521
public final static <T> CompletableFuture<List<T>> streamToCompletableFuture(final Stream<T> stream) {
        return CompletableFuture.completedFuture(stream.collect(Collectors.toList()));

    }
59864
function getCurrentValue(stream, key) {
	if (stream._currentEvent && stream._currentEvent.type === key) {
		return stream._currentEvent.value;
	} else {
		var names = keyNames[key];
		if (!names) {
			return stream[key];
		}
		var VALUE,
			valueHandler = function(value) {
				VALUE = value;
			};
		stream[names.on](valueHandler);
		stream[names.off](valueHandler);
		return VALUE;
	}
}
722932
private static Map<String, Method> getAllMethod(Class<?> clazz, Map<String, Method> methods) {
        if (clazz == null || clazz == Object.class) {
            return methods;
        }

        Arrays.stream(clazz.getDeclaredMethods()).forEach(method -> {
            String key = String.format("%s:%s", method.getName(),
                ByteCodeUtils.getMethodDesc(method));
            Method m = methods.get(key);
            if (m == null || (m.getDeclaringClass().isInterface()
                              && !method.getDeclaringClass().isInterface())) {
                methods.put(key, method);
            }
        });

        Arrays.stream(clazz.getInterfaces()).forEach(c -> getAllMethod(c, methods));

        return getAllMethod(clazz.getSuperclass(), methods);
    }
888270
function consumeKeywordOrFunction(stream) {
	const kw = consumeKeyword(stream);
	if (kw) {
		const args = consumeArgumentList(stream);
		return args ? new FunctionCall(kw.toString(), args) : kw;
	}
}