Package org.apache.lucene.util.encoding

Examples of org.apache.lucene.util.encoding.IntEncoder.encode()


   
    // cover negative numbers;
    IntEncoder enc = new VInt8IntEncoder();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    enc.reInit(baos);
    enc.encode(-1);
   
    IntDecoder dec = enc.createMatchingDecoder();
    dec.reInit(new ByteArrayInputStream(baos.toByteArray()));
    assertEquals(-1, dec.decode());
  }
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.