Package org.apache.servicemix.document

Examples of org.apache.servicemix.document.Resource


        out.close();
        return register(out.toByteArray());
    }

    public String register(final byte[] data) {
        return register(new Resource() {
            public InputStream open() throws IOException {
                return new ByteArrayInputStream(data);
            }
        });
View Full Code Here


            }
            @Override
            public InputStream getInputStream() throws IOException {
                connect();
                Long idx = Long.parseLong(getURL().getPath());
                Resource res = documents.get(idx);
                if (res == null) {
                    throw new FileNotFoundException(getURL().toString());
                }
                return res.open();
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.document.Resource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.