Examples of byteArrayOffset()


Examples of com.foundationdb.util.ByteSource.byteArrayOffset()

        else if(value instanceof ByteBuffer) {
            buffer = (ByteBuffer)value;
        }
        else if(value instanceof ByteSource) {
            ByteSource bs = (ByteSource)value;
            buffer = ByteBuffer.wrap(bs.byteArray(), bs.byteArrayOffset(), bs.byteArrayLength());
        }
        else {
            throw new IllegalArgumentException("Requires byte[] or ByteBuffer");
        }
        return buffer;
View Full Code Here

Examples of com.foundationdb.util.ByteSource.byteArrayOffset()

                bytes = (byte[])object;
            }
            else {
                ByteSource source = (ByteSource) object;
                byte[] srcArray = source.byteArray();
                int offset = source.byteArrayOffset();
                int end = offset + source.byteArrayLength();
                bytes = Arrays.copyOfRange(srcArray, offset, end);
            }
            type = MBinary.VARBINARY.instance(bytes.length, false);
            value = new Value(type, bytes);
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.