Examples of subBytes()


Examples of dovetaildb.bytes.Bytes.subBytes()

      assert docId > lastDocId;
      lastDocId = docId;
      do {
        Bytes idTerm = idQuery.term();
        assert idTerm.compareToParts(ID_BYTES, 0, 0, NUM_ID_BYTES, NUM_ID_BYTES, 9) == 0;
        byte[] idBytes = idTerm.subBytes(NUM_ID_BYTES, idTerm.getLength()-NUM_ID_BYTES).getBytes();
        String idString = Util.encodeBytes(idBytes);
        Object val = entries.get(idString);
        if (val != null) {
          entries.remove(idString);
          DbServiceUtil.sencodeMulti(ArrayBytes.EMPTY_BYTES, ArrayBytes.EMPTY_BYTES, val, edits, docId, false);
View Full Code Here

Examples of dovetaildb.bytes.Bytes.subBytes()

 
  public static ArrayList<EditRec> popTermBytes(ArrayList<EditRec> editBuffer) {
    ArrayList<EditRec> newTermBytes = new ArrayList<EditRec>();
    for(EditRec edit : editBuffer) {
      Bytes term = edit.term;
      term = term.subBytes(1, term.getLength()-1);
      newTermBytes.add(new EditRec(edit.docId, term, edit.isDeletion));
    }
    return newTermBytes;
  }
View Full Code Here

Examples of dovetaildb.bytes.Bytes.subBytes()

      QueryNode idQuery = new OrderedOrQueryNode(clauses, null, null, null, false, false);
      Map<String, Object> entries = value.getEntries();
      do {
        long docId = idQuery.doc();
        Bytes idTerm = idQuery.term();
        byte[] idBytes = idTerm.subBytes(NUM_ID_BYTES, idTerm.getLength()-NUM_ID_BYTES).getBytes();
        Object val = entries.get(Util.encodeBytes(idBytes));
        DbServiceUtil.sencodeMulti(ArrayBytes.EMPTY_BYTES, val, edits, docId, false);
      } while(idQuery.next());
    }
    return edits;
View Full Code Here

Examples of dovetaildb.bytes.Bytes.subBytes()

    Bytes[] subTerms = new Bytes[numTerms-idx]; // at most this many elements
    int subIdx = 0;
    for(;idx<numTerms;idx++) {
      Bytes curTerm = terms[idx];
      if (cmpKey.isPrefixOf(curTerm)) {
        subTerms[subIdx++] = curTerm.subBytes(keyLen, curTerm.getLength()-keyLen);
      } else {
        break;
      }
    }
    if (subIdx == 0) return null; // as opposed to a DbResult representing null
View Full Code Here

Examples of dovetaildb.bytes.Bytes.subBytes()

      Bytes term = terms[termIdx];
      int len = term.getLength();
      for(int i=1; i<len; i++) {
        if (term.get(i) == ':') {
          try {
            keys.add(new String(term.subBytes(1, i-1).getBytes(), "utf-8"));
          } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
          }
          break;
        }
View Full Code Here

Examples of sun.font.CreatedFontTracker.subBytes()

                Font font = new Font(tFile, fontFormat, true, tracker);
                return font;
            } finally {
                if (!copiedFontData) {
                    if (tracker != null) {
                        tracker.subBytes(totalSize);
                    }
                    AccessController.doPrivileged(
                        new PrivilegedExceptionAction<Void>() {
                            public Void run() {
                                tFile.delete();
View Full Code Here

Examples of sun.font.CreatedFontTracker.subBytes()

                Font font = new Font(tFile, fontFormat, true, tracker);
                return font;
            } finally {
                if (!copiedFontData) {
                    if (tracker != null) {
                        tracker.subBytes(totalSize);
                    }
                    AccessController.doPrivileged(
                        new PrivilegedExceptionAction<Void>() {
                            public Void run() {
                                tFile.delete();
View Full Code Here

Examples of sun.font.CreatedFontTracker.subBytes()

                Font font = new Font(tFile, fontFormat, true, tracker);
                return font;
            } finally {
                if (!copiedFontData) {
                    if (tracker != null) {
                        tracker.subBytes(totalSize);
                    }
                    AccessController.doPrivileged(
                        new PrivilegedExceptionAction<Void>() {
                            public Void run() {
                                tFile.delete();
View Full Code Here

Examples of sun.font.CreatedFontTracker.subBytes()

                Font font = new Font(tFile, fontFormat, true, tracker);
                return font;
            } finally {
                if (!copiedFontData) {
                    if (tracker != null) {
                        tracker.subBytes(totalSize);
                    }
                    AccessController.doPrivileged(
                        new PrivilegedExceptionAction<Void>() {
                            public Void run() {
                                tFile.delete();
View Full Code Here

Examples of sun.font.CreatedFontTracker.subBytes()

                Font font = new Font(tFile, fontFormat, true, tracker);
                return font;
            } finally {
                if (!copiedFontData) {
                    if (tracker != null) {
                        tracker.subBytes(totalSize);
                    }
                    AccessController.doPrivileged(
                        new PrivilegedExceptionAction<Void>() {
                            public Void run() {
                                tFile.delete();
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.