On Jul 9, 2009, at 5:47 PM, Florent Guillaume wrote:

On 9 Jul 2009, at 17:28, Ugo Cei wrote:
Is there a method in Chemistry client APIs for reading a document's contents (basically for fetching whatever is pointed to by the ContentStreamUri property?).

Document.getStream does that. It hides the details of the transport from you (and there may not even by any CMIS transport if everything is local). You can also use Document.getContentStream which returns a richer ContentStream datastructure with filename, mime type and length.


That would be nice, were it not for a small detail:


    public InputStream getStream() throws IOException {
        throw new UnsupportedOperationException("Not yet implemented");
    }

I guess there's space here for someone wanting to contribute a nice little implementation ;)

        Ugo

P.S.: is there a way to check that a CMISObject is a Document before casting down, other that using instanceof?

--
Ugo Cei
Sourcesense - making sense of Open Source: http://www.sourcesense.com

Reply via email to