Examples of BinaryBinding


Examples of org.apache.jackrabbit.mk.store.BinaryBinding

    public ChildNodeEntriesMap readCNEMap(Id id) throws NotFoundException, Exception {
        File f = getFile(id);
        if (f.exists()) {
            BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));
            try {
                return ChildNodeEntriesMap.deserialize(new BinaryBinding(in));
            } finally {
                in.close();
            }
        } else {
            throw new NotFoundException(id.toString());
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        }
    }

    public Id writeCNEMap(ChildNodeEntriesMap map) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        map.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();
        Id id = new Id(idFactory.createContentId(bytes));
        writeFile(id, bytes);
        return id;
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

    public void readNode(StoredNode node) throws NotFoundException, Exception {
        Id id = node.getId();
        byte[] bytes = objects.get(id);
        if (bytes != null) {
            node.deserialize(new BinaryBinding(new ByteArrayInputStream(bytes)));
            return;
        }
        throw new NotFoundException(id.toString());
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        throw new NotFoundException(id.toString());
    }

    public Id writeNode(Node node) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        node.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();
        Id id = new Id(idFactory.createContentId(bytes));

        if (!objects.containsKey(id)) {
            objects.put(id, bytes);
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

    }

    public StoredCommit readCommit(Id id) throws NotFoundException, Exception {
        byte[] bytes = objects.get(id);
        if (bytes != null) {
            return StoredCommit.deserialize(id, new BinaryBinding(new ByteArrayInputStream(bytes)));
        }
        throw new NotFoundException(id.toString());
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        throw new NotFoundException(id.toString());
    }

    public void writeCommit(Id id, Commit commit) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        commit.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();

        if (!objects.containsKey(id)) {
            objects.put(id, bytes);
        }
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

    }

    public ChildNodeEntriesMap readCNEMap(Id id) throws NotFoundException, Exception {
        byte[] bytes = objects.get(id);
        if (bytes != null) {
            return ChildNodeEntriesMap.deserialize(new BinaryBinding(new ByteArrayInputStream(bytes)));
        }
        throw new NotFoundException(id.toString());
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        throw new NotFoundException(id.toString());
    }

    public Id writeCNEMap(ChildNodeEntriesMap map) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        map.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();
        Id id = new Id(idFactory.createContentId(bytes));

        if (!objects.containsKey(id)) {
            objects.put(id, bytes);
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

    }
   
    @Override
    public void replaceCommit(Id id, Commit commit) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        commit.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();

        objects.put(id, bytes);
        marked.put(id, bytes);
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

    public void readNode(StoredNode node) throws NotFoundException, Exception {
        Id id = node.getId();
        byte[] bytes = objects.get(id);
        if (bytes != null) {
            node.deserialize(new BinaryBinding(new ByteArrayInputStream(bytes)));
            return;
        }
        throw new NotFoundException(id.toString());
    }
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.