Examples of convertStreamToByteArray()


Examples of org.apache.lucene.facet.index.CategoryListPayloadStream.convertStreamToByteArray()

      int length = countingListName.length();
      this.termAttribute.resizeBuffer(length);
      countingListName.getChars(0, length, termAttribute.buffer(), 0);
      this.termAttribute.setLength(length);
      CategoryListPayloadStream payloadStream = entry.getValue();
      payload.setData(payloadStream.convertStreamToByteArray());
      this.payloadAttribute.setPayload(payload);
      return true;
    }
    return false;
  }
View Full Code Here

Examples of org.apache.lucene.facet.index.CategoryListPayloadStream.convertStreamToByteArray()

    clps.appendIntToStream(10000000);
    clps.appendIntToStream(100000000);
    clps.appendIntToStream(1000000000);
    clps.appendIntToStream(Integer.MAX_VALUE);

    ByteArrayInputStream bais = new ByteArrayInputStream(clps
        .convertStreamToByteArray());
    IntDecoder decoder = new DGapIntDecoder(new NOnesIntDecoder(3));
    decoder.reInit(bais);
    assertEquals("Wrong value in byte stream", 1, decoder.decode());
    assertEquals("Wrong value in byte stream", 10, decoder.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.