Package dovetaildb.bytes

Examples of dovetaildb.bytes.Bytes.flatten()


    if (val instanceof Map) {
      Map map = (Map)val;
      prefix = CompoundBytes.make(prefix, HEADER_BYTE_MAPOPEN);
      if (true) {
        Bytes headerBytes = CompoundBytes.make(prefix, suffix);
        buffer.add(new EditRec(docId, headerBytes.flatten(), idDel));
      }
      for(Object entryObj : map.entrySet()) {
        Map.Entry entry = (Map.Entry) entryObj;
        String key = (String)entry.getKey();
        Bytes sub = new CompoundBytes(prefix, sencodeMapKey(key));
View Full Code Here


    } else if (val instanceof List) {
      List list = (List)val;
      prefix = CompoundBytes.make(prefix, HEADER_BYTE_LISTOPEN);
      if (true) {
        Bytes headerBytes = CompoundBytes.make(prefix, suffix);
        buffer.add(new EditRec(docId, headerBytes.flatten(), idDel));
      }
      for(int index=list.size()-1; index>=0; index--) {
        Object subVal = list.get(index);
        Bytes newSuffix = CompoundBytes.make(DbServiceUtil.sencodeListIndex(index), suffix);
        sencodeMulti(prefix, newSuffix, subVal, buffer, docId, idDel);
View Full Code Here

        Bytes newSuffix = CompoundBytes.make(DbServiceUtil.sencodeListIndex(index), suffix);
        sencodeMulti(prefix, newSuffix, subVal, buffer, docId, idDel);
      }
    } else {
      Bytes bytes = CompoundBytes.make(CompoundBytes.make(prefix,sencode(val)),suffix);
      buffer.add(new EditRec(docId, bytes.flatten(), false));
    }
  }
 
  public static char typeOfObject(Object val) {
    if (val instanceof Number) {
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.