Examples of grow()


Examples of org.apache.derby.iapi.services.io.FormatableBitSet.grow()

                    required_cols = new FormatableBitSet(0);

                // add in start columns
                if (this.init_startKeyValue != null)
                {
          required_cols.grow(this.init_startKeyValue.length);
                    for (int i = 0; i < this.init_startKeyValue.length; i++)
                        required_cols.set(i);
                }

                if (this.init_stopKeyValue != null)
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatableBitSet.grow()

                        required_cols.set(i);
                }

                if (this.init_stopKeyValue != null)
                {
          required_cols.grow(this.init_stopKeyValue.length);
                    for (int i = 0; i < this.init_stopKeyValue.length; i++)
                        required_cols.set(i);
                }

                FormatableBitSet required_cols_and_scan_list =
View Full Code Here

Examples of org.apache.lucene.util.BytesRef.grow()

        res.put(association.getCategoryListID(), bytes);
      }
     
      int maxBytesNeeded = 4 /* int */ + association.maxBytesNeeded() + bytes.length;
      if (bytes.bytes.length < maxBytesNeeded) {
        bytes.grow(maxBytesNeeded);
      }
     
      // reset the output to write from bytes.length (current position) until the end
      output.reset(bytes.bytes, bytes.length, bytes.bytes.length - bytes.length);
      output.writeInt(ordinals.ints[idx++]);
View Full Code Here

Examples of org.apache.lucene.util.BytesRef.grow()

      done = true;
      visited.add(s);
      if (!s.accept && s.numTransitions() == 1) {
        Transition t = s.getTransitions().iterator().next();
        if (t.min == t.max && !visited.contains(t.to)) {
          ref.grow(++ref.length);
          ref.bytes[ref.length - 1] = (byte)t.min;
          s = t.to;
          done = false;
        }
      }
View Full Code Here

Examples of org.apache.lucene.util.BytesRef.grow()

        for(int i=grams-1;i>0;i--) {
          BytesRef token = lastTokens[i-1];
          if (token == null) {
            continue;
          }
          token.grow(token.length+1);
          token.bytes[token.length] = separator;
          token.length++;
          lastTokens[i] = token;
        }
        lastTokens[0] = new BytesRef();
View Full Code Here

Examples of org.apache.lucene.util.BytesRef.grow()

        int numEntries = output.ords.size();
        // output size, assume the worst case
        int estimatedSize = 5 + numEntries * 5; // numEntries + one ord for each entry
       
        scratch.grow(estimatedSize);
        scratchOutput.reset(scratch.bytes, scratch.offset, scratch.bytes.length);
        assert scratch.offset == 0;

        // now write our output data:
        int count = 0;
View Full Code Here

Examples of org.apache.lucene.util.BytesRef.grow()

        BytesRef term = new BytesRef();
        term.copyBytes(lastTerm);
        final int start = tvf.readVInt();
        final int deltaLen = tvf.readVInt();
        term.length = start + deltaLen;
        term.grow(term.length);
        tvf.readBytes(term.bytes, start, deltaLen);
        t.term = term;
        int freq = tvf.readVInt();
        t.freq = freq;
       
View Full Code Here

Examples of org.apache.lucene.util.BytesRef.grow()

                                                                            outputsInner.newPair((long) docFreq, totalTermFreq)));
          }
          lastDocsStart = in.getFilePointer();
          final int len = scratch.length - TERM.length;
          if (len > lastTerm.length) {
            lastTerm.grow(len);
          }
          System.arraycopy(scratch.bytes, TERM.length, lastTerm.bytes, 0, len);
          lastTerm.length = len;
          docFreq = 0;
          sumTotalTermFreq += totalTermFreq;
View Full Code Here

Examples of org.apache.lucene.util.BytesRef.grow()

      for (int j = 0; j < termCount; j++) {
        readLine();
        assert StringHelper.startsWith(scratch, TERMTEXT);
        BytesRef term = new BytesRef();
        int termLength = scratch.length - TERMTEXT.length;
        term.grow(termLength);
        term.length = termLength;
        System.arraycopy(scratch.bytes, scratch.offset+TERMTEXT.length, term.bytes, term.offset, termLength);
       
        SimpleTVPostings postings = new SimpleTVPostings();
        terms.terms.put(term, postings);
View Full Code Here

Examples of org.apache.lucene.util.BytesRef.grow()

        BytesRef term = new BytesRef();
        term.copyBytes(lastTerm);
        final int start = tvf.readVInt();
        final int deltaLen = tvf.readVInt();
        term.length = start + deltaLen;
        term.grow(term.length);
        tvf.readBytes(term.bytes, start, deltaLen);
        t.term = term;
        int freq = tvf.readVInt();
        t.freq = freq;
       
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.