Package org.apache.lucene.util

Examples of org.apache.lucene.util.UnsafeByteArrayOutputStream.reInit()


    byte[] buffer2 = new byte[length2];
    for (int i = 0; i < length2; i++) {
      buffer2[i] = (byte) (8 + i);
    }

    ubaos.reInit(buffer2);
    for (int i = 0; i < length2; i++) {
      ubaos.write(7 + i);
    }

    byte[] result2 = ubaos.toByteArray();
View Full Code Here


  }
 
  @Test(expected=IllegalArgumentException.class)
  public void testIllegalBufferSize() throws Exception {
    UnsafeByteArrayOutputStream ubaos = new UnsafeByteArrayOutputStream();
    ubaos.reInit(new byte[0]);
  }

}
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.