Posted By

narkisr on 03/16/10


Tagged

update stream couchdb consum


Versions (?)

Consuming couchdb continues update stream


 / Published in: Java
 

How to consume the updates stream of couchdb.

  1. URL u = new URL("http://host:5984/db_name/_changes?feed=continuous")
  2. URLConnection uc = u.openConnection();
  3. uc.connect();
  4. InputStream input = uc.getInputStream()
  5. while ((b = input.read()) != -1) {
  6. System.out.write(b);
  7. }

Report this snippet  

You need to login to post a comment.