incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodrigo Mansho <rodrigoman...@gmail.com>
Subject Re: Developing CouchDB in JAVA
Date Fri, 30 Jan 2009 13:54:22 GMT
I'm using jcouchdb, and Yes, I created a document.
I can store any document, but only  text document is correctly opened.

         Server server = new ServerImpl(COUCHDB_HOST, COUCHDB_PORT);
         server.createDatabase("jcouchdb_test");
         FooDocument fooDocument = new FooDocument("document image");
         Reader fu = new Reader("pt.gif");
         byte [] byteArray = fu.getBytes();
        fooDocument.addAttachment("testiagem", new Attachment("image/gif",
byteArray));
        Database db = createDatabaseForTest();
        db.createDocument(fooDocument);


-- 
Rodrigo Mansho
USP - ICMC

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message