Examples of ensureFit()


Examples of com.persistit.Value.ensureFit()

        private Value readValue() throws IOException {
            int size = readLength();
            if (size < 1) { return null; }
            Value value = new Value ((Persistit)null);
            value.setMaximumSize(size);
            value.ensureFit(size);
            int bytesRead = is.read(value.getEncodedBytes(), 0, size);
            assert bytesRead == size : "Invalid byte count on value read";
            value.setEncodedSize(size);
            return value;
        }
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.