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 12:31:12 GMT
 Thanks, but when I wanna put a image or document .pdf, I used this code:

    FooDocument fooDocument = new FooDocument("with image");
    Reader fu = new Reader("image.gif");
//*
public Reader(String fileName) throws FileNotFoundException{ constructor
        this(new File(fileName));
    }
*//
    byte [] byteArray = fu.getBytes();
    fooDocument.addAttachment("testiagem", new Attachment("image/gif",
byteArray));

 and when i get this document, this document is wrong. Anybody know why
occurs this wrong?



-- 
Rodrigo Mansho
USP - ICMC

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