org.apache.blur.thirdparty.thrift_0_9_0.transport
Class AutoExpandingBuffer
java.lang.Object
org.apache.blur.thirdparty.thrift_0_9_0.transport.AutoExpandingBuffer
public class AutoExpandingBuffer
- extends Object
Helper class that wraps a byte[] so that it can expand and be reused. Users
should call resizeIfNecessary to make sure the buffer has suitable capacity,
and then use the array as needed. Note that the internal array will grow at a
rate slightly faster than the requested capacity with the (untested)
objective of avoiding expensive buffer allocations and copies.
AutoExpandingBuffer
public AutoExpandingBuffer(int initialCapacity,
double growthCoefficient)
resizeIfNecessary
public void resizeIfNecessary(int size)
array
public byte[] array()
Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.