Package org.exist.storage.io

Examples of org.exist.storage.io.VariableByteInput.readInt()


                            {continue;}
                        //try {
                        while (is.available() > 0) {
                            final int storedDocId = is.readInt();
                            final byte section = is.readByte();
                            final int gidsCount = is.readInt();
                            //Read (variable) length of node IDs + frequency + offsets
                            final int length = is.readFixedInt();
                            if (storedDocId != document.getDocId()) {
                                // data are related to another document:
                                // copy them to any existing data
View Full Code Here


        verify(mockOs);

        //read expectations
        expect(mockIs.available()).andReturn(1);
        expect(mockIs.readByte()).andReturn(byteCapture.getValue());
        expect(mockIs.readInt()).andReturn(intCapture.getValue());
        expect(mockIs.readUTF()).andReturn(strCapture.getValue());
        expect(mockIs.available()).andReturn(0);

        replay(mockIs);
View Full Code Here

        //max and nsMax
        expect(mockIs.readShort()).andReturn((short)1);
        expect(mockIs.readShort()).andReturn((short)1);

        //localnames
        expect(mockIs.readInt()).andReturn(1);
        expect(mockIs.readUTF()).andReturn("local-name");
        expect(mockIs.readShort()).andReturn((short)67);

        //namespaces
        expect(mockIs.readInt()).andReturn(1);
View Full Code Here

        expect(mockIs.readInt()).andReturn(1);
        expect(mockIs.readUTF()).andReturn("local-name");
        expect(mockIs.readShort()).andReturn((short)67);

        //namespaces
        expect(mockIs.readInt()).andReturn(1);
        expect(mockIs.readUTF()).andReturn("http://some/or/other");
        expect(mockIs.readShort()).andReturn((short)77);

        //default mappings
        expect(mockIs.readInt()).andReturn(1);
View Full Code Here

        expect(mockIs.readInt()).andReturn(1);
        expect(mockIs.readUTF()).andReturn("http://some/or/other");
        expect(mockIs.readShort()).andReturn((short)77);

        //default mappings
        expect(mockIs.readInt()).andReturn(1);
        expect(mockIs.readUTF()).andReturn("mapping");
        expect(mockIs.readShort()).andReturn((short)87);

        //mimetypes
        expect(mockIs.readInt()).andReturn(1);
View Full Code Here

        expect(mockIs.readInt()).andReturn(1);
        expect(mockIs.readUTF()).andReturn("mapping");
        expect(mockIs.readShort()).andReturn((short)87);

        //mimetypes
        expect(mockIs.readInt()).andReturn(1);
        expect(mockIs.readUTF()).andReturn("some/other");
        expect(mockIs.readInt()).andReturn(97);

        //replay
        replay(mockIs);
View Full Code Here

        expect(mockIs.readShort()).andReturn((short)87);

        //mimetypes
        expect(mockIs.readInt()).andReturn(1);
        expect(mockIs.readUTF()).andReturn("some/other");
        expect(mockIs.readInt()).andReturn(97);

        //replay
        replay(mockIs);

        //action
View Full Code Here

                os.clear();
                VariableByteInput is = index.db.getAsStream(value);
                if (is == null)
                    continue;
                while (is.available() > 0) {
                    int storedDocId = is.readInt();
                    byte nameType = is.readByte();
                    int occurrences = is.readInt();
                    //Read (variable) length of node IDs + frequency + offsets
                    int length = is.readFixedInt();
                    if (storedDocId != currentDoc.getDocId()) {
View Full Code Here

                if (is == null)
                    continue;
                while (is.available() > 0) {
                    int storedDocId = is.readInt();
                    byte nameType = is.readByte();
                    int occurrences = is.readInt();
                    //Read (variable) length of node IDs + frequency + offsets
                    int length = is.readFixedInt();
                    if (storedDocId != currentDoc.getDocId()) {
                        // data are related to another document:
                        // copy them to any existing data
View Full Code Here

                            NodeId previous = null;
                            OccurrenceList newOccurrences = new OccurrenceList();
                            for (int m = 0; m < occurrences; m++) {
                                NodeId nodeId = index.getBrokerPool().getNodeFactory().createFromStream(previous, is);
                                previous = nodeId;
                                int freq = is.readInt();
                                // add the node to the new list if it is not
                                // in the list of removed nodes
                                if (!occurencesList.contains(nodeId)) {
                                    for (int n = 0; n < freq; n++) {
                                        newOccurrences.add(nodeId, is.readInt());
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.