Question: I cannot access <http://android.git.kernel.org/>. So where can I download the source code of the Music Player default of android?  

I'm using android 2.2.1

**Edit:**  

Android source now can be found here: <https://android.googlesource.com/>

Answer: 
[`node-mongodb-driver`](https://github.com/mongodb/node-mongodb-native) (the underlying layer that every mongoDB client uses in nodejs) except the cursor API that others mentioned has a nice stream API ([#458](https://github.com/mongodb/node-mongodb-native/pull/458)). Unfortunately i did not find it documented elsewhere.

Update: [there are docs](https://docs.mongodb.com/drivers/node/current/fundamentals/crud/read-operations/cursor/#stream-api).

It can be used like this:

```
var stream = collection.find().stream()
stream.on('error', function (err) {
  console.error(err)
})
stream.on('data', function (doc) {
  console.log(doc)
})

```

It actually implements the ReadableStream interface, so it has all the goodies (pause/resume etc)
`mongoose` is not really "driver", it's actually an ORM wrapper around the MongoDB driver ([`node-mongodb-native`](https://github.com/christkv/node-mongodb-native)).

To do what you're doing, take a look at the driver's `.find` and `.each` method. Here's some code from the examples:

```
// Find all records. find() returns a cursor
collection.find(function(err, cursor) {
  sys.puts("Printing docs from Cursor Each")
  cursor.each(function(err, doc) {
    if(doc != null) sys.puts("Doc from Each " + sys.inspect(doc));
  })                    
});

```

To stream the results, you're basically replacing that `sys.puts` with your "stream" function. Not sure how you plan to stream the results. I think you can do `response.write() + response.flush()`, but you may also want to checkout `socket.io`.