Package org.exist.storage.io

Examples of org.exist.storage.io.VariableByteOutputStream.data()


        assertEquals(groupId2, permission.getACEId(1));
        assertEquals(ACE_TARGET.GROUP, permission.getACETarget(1));
        assertEquals(mode2, permission.getACEMode(1));
       
        //get the written acl data
        ByteArray buf = os.data();
        byte data[] = new byte[buf.size()];
        buf.copyTo(data, 0);
       
       
        //create a new permission instance
View Full Code Here


                collection.setId(getNextCollectionId(transaction));
            }
            final Value name = new CollectionStore.CollectionKey(collection.getURI().toString());
            final VariableByteOutputStream os = new VariableByteOutputStream(8);
            collection.write(this, os);
            final long address = collectionsDb.put(transaction, name, os.data(), true);
            if(address == BFile.UNKNOWN_ADDRESS) {
                //TODO : exception !!! -pb
                LOG.warn("could not store collection data for '" + collection.getURI() + "'");
                return;
            }
View Full Code Here

        try {
            lock.acquire(Lock.WRITE_LOCK);
            final VariableByteOutputStream os = new VariableByteOutputStream(8);
            doc.write(os);
            final Value key = new CollectionStore.DocumentKey(doc.getCollection().getId(), doc.getResourceType(), doc.getDocId());
            collectionsDb.put(transaction, key, os.data(), true);
            //} catch (ReadOnlyException e) {
            //LOG.warn(DATABASE_IS_READ_ONLY);
        } catch(final LockException e) {
            LOG.warn("Failed to acquire lock on " + collectionsDb.getFile().getName());
        } catch(final IOException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.