Package Common

Examples of Common.IntVector


            type = this.inStream.ReadID();
        }
       
        LongVector unPackSizes = new LongVector();
        BoolVector digestsDefined = new BoolVector();
        IntVector digests = new IntVector();
       
        if (type == Header.NID.kMainStreamsInfo) {
            type = this.inStream.ReadID();
            assert (type == Header.NID.kPackInfo);
            this.ReadPackInfo(this.PackSizes, this.PackCRCsDefined, this.PackCRCs, 0);
           
            type = this.inStream.ReadID();
            assert (type == Header.NID.kUnPackInfo);
            this.Folders = ReadUnPackInfo(dataVector);
           
            type = this.inStream.ReadID();
            assert (type == Header.NID.kSubStreamsInfo);
            this.ReadSubStreamsInfo(this.Folders, this.NumUnPackStreamsVector, unPackSizes, digestsDefined, digests);
           
            type = this.inStream.ReadID();
            assert (type == Header.NID.kEnd);
           
            this.ArchiveInfo.DataStartPosition += this.ArchiveInfo.StartPositionAfterHeader;
            type = this.inStream.ReadID();
        } else {
            for(int i = 0; i < this.Folders.size(); i++) {
                this.NumUnPackStreamsVector.add(1);
                Folder folder = (Folder)this.Folders.get(i);
                unPackSizes.add(folder.GetUnPackSize());
                digestsDefined.add(folder.UnPackCRCDefined);
                digests.add(folder.UnPackCRC);
            }
        }
       
        if (type == Header.NID.kEnd)
            return;
View Full Code Here


       
        final ArrayList bsizes = new ArrayList();
        do {
            if (type == Header.NID.kCRC) {
                BoolVector digestsDefined2 = new BoolVector();
                IntVector digests2 = new IntVector();
                digests2 = this.inStream.ReadHashDigests(numDigests, digestsDefined2);
                int digestIndex = 0;
               
                for (int i=0; i<folders.size(); i++) {
                  numSubstreams = numUnPackStreamsInFolders.get(i);
                  Folder folder = (Folder)folders.get(i);
                  if (numSubstreams == 1 && folder.UnPackCRCDefined) {
                    bsizes.add(Boolean.TRUE);
                    sizes.add(new Integer(folder.UnPackCRC));
                  } else {
                    for (int j=0; j<numSubstreams; j++, digestIndex++) {
                      bsizes.add(new Boolean(digestsDefined2.get(digestIndex)));
                      sizes.add(new Integer(digests2.get(digestIndex)));
                    }
                  }
                }
                digestsDefined.addAll(bsizes);
                bsizes.clear();
View Full Code Here

   
    private Vector ReadAndDecodePackedStreams(long baseOffset, int dataStartPosIndex) throws IOException {
        LongVector packSizes = new LongVector();
       
        BoolVector packCRCsDefined = new BoolVector();
        IntVector packCRCs = new IntVector();
       
        long type = this.inStream.ReadID();
        assert (type == Header.NID.kPackInfo);
        this.ReadPackInfo(packSizes, packCRCsDefined, packCRCs, dataStartPosIndex);
       
View Full Code Here

       
        long type;
        while ((type = this.inStream.ReadID()) != Header.NID.kEnd) {
            if (type == Header.NID.kCRC) {
                BoolVector crcsDefined = new BoolVector();
                IntVector crcs = new IntVector();
                crcs = this.inStream.ReadHashDigests(numFolders, crcsDefined);
                for (int i=0; i<numFolders; i++) {
                    Folder folder = (Folder)folders.get(i);
                    folder.UnPackCRCDefined = crcsDefined.get(i);
                    folder.UnPackCRC = crcs.get(i);
                }
                continue;
            }
            this.inStream.SkeepData();
        }
View Full Code Here

   
    public IntVector ReadHashDigests(
        int numItems,
            BoolVector digestsDefined) throws IOException {
        digestsDefined.setBoolVector(ReadBoolVector2(numItems));
        final IntVector digests = new IntVector(numItems);
        digests.clear();
        digests.Reserve(numItems);
        for (int i=0; i<numItems; i++) {
            int crc = 0;
            if (digestsDefined.get(i))
                crc = ReadUInt32();
            digests.add(crc);
        }
        return digests;
    }
View Full Code Here

TOP

Related Classes of Common.IntVector

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.