Examples of VIntValueReader


Examples of com.ning.tr13.impl.vint.VIntValueReader

    return rt.totalMemory() - rt.freeMemory();
  }
 
  private HashMap<String,Integer> loadMap() throws Exception
  {
        VIntValueReader kr = new VIntValueReader(_file);
        final HashMap<String,Integer> result = new HashMap<String,Integer>();
       
        kr.readAll(new KeyValueReader.ValueCallback<Long>() {
            @Override
            public void handleEntry(byte[] key, Long value) {
              // platform-dependant is ok; only have ascii chars:
              result.put(new String(key), Integer.valueOf(value.intValue()));
            }
View Full Code Here

Examples of com.ning.tr13.impl.vint.VIntValueReader

        return result;
  }
 
  private byte[] loadRawTrie() throws IOException
  {
      SimpleVIntTrieBuilder b = new SimpleVIntTrieBuilder(new VIntValueReader(_file));
      // To re-order or not? Reordering can increase speed slightly (5-10%)
      b.setReorderEntries(true);
      return b.build().serialize();
  }
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.