Package org.apache.jackrabbit.mongomk.command

Examples of org.apache.jackrabbit.mongomk.command.WriteBlobCommandMongo


    @Test
    public void testWriteBlobComplete() throws Exception {
        int blobLength = 100;
        byte[] blob = createBlob(blobLength);

        WriteBlobCommandMongo command = new WriteBlobCommandMongo(mongoConnection,
                new ByteArrayInputStream(blob));
        String blobId = command.execute();
        assertNotNull(blobId);

        byte[] readBlob = new byte[blobLength];
        readBlob(blobId, readBlob);
        assertTrue(Arrays.equals(blob, readBlob));
View Full Code Here


        return commandExecutor.execute(command);
    }

    @Override
    public String writeBlob(InputStream is) throws Exception {
        Command<String> command = new WriteBlobCommandMongo(mongoConnection, is);
        return commandExecutor.execute(command);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.mongomk.command.WriteBlobCommandMongo

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.