Lines Matching defs:byteBuffer
36 private final ByteBuffer byteBuffer;
38 static LongBuffer asLongBuffer(ByteBuffer byteBuffer) {
39 ByteBuffer slice = byteBuffer.slice();
40 slice.order(byteBuffer.order());
44 private ByteBufferAsLongBuffer(ByteBuffer byteBuffer) {
45 super(byteBuffer.capacity() / SizeOf.LONG);
46 this.byteBuffer = byteBuffer;
47 this.byteBuffer.clear();
48 this.effectiveDirectAddress = byteBuffer.effectiveDirectAddress;
53 ByteBufferAsLongBuffer buf = new ByteBufferAsLongBuffer(byteBuffer.asReadOnlyBuffer());
57 buf.byteBuffer.order = byteBuffer.order;
63 if (byteBuffer.isReadOnly()) {
66 byteBuffer.limit(limit * SizeOf.LONG);
67 byteBuffer.position(position * SizeOf.LONG);
68 byteBuffer.compact();
69 byteBuffer.clear();
78 ByteBuffer bb = byteBuffer.duplicate().order(byteBuffer.order());
91 return byteBuffer.getLong(position++ * SizeOf.LONG);
97 return byteBuffer.getLong(index * SizeOf.LONG);
102 byteBuffer.limit(limit * SizeOf.LONG);
103 byteBuffer.position(position * SizeOf.LONG);
104 if (byteBuffer instanceof DirectByteBuffer) {
105 ((DirectByteBuffer) byteBuffer).get(dst, dstOffset, longCount);
107 ((ByteArrayBuffer) byteBuffer).get(dst, dstOffset, longCount);
115 return byteBuffer.isDirect();
120 return byteBuffer.isReadOnly();
125 return byteBuffer.order();
145 byteBuffer.putLong(position++ * SizeOf.LONG, c);
152 byteBuffer.putLong(index * SizeOf.LONG, c);
158 byteBuffer.limit(limit * SizeOf.LONG);
159 byteBuffer.position(position * SizeOf.LONG);
160 if (byteBuffer instanceof DirectByteBuffer) {
161 ((DirectByteBuffer) byteBuffer).put(src, srcOffset, longCount);
163 ((ByteArrayBuffer) byteBuffer).put(src, srcOffset, longCount);
171 byteBuffer.limit(limit * SizeOf.LONG);
172 byteBuffer.position(position * SizeOf.LONG);
173 ByteBuffer bb = byteBuffer.slice().order(byteBuffer.order());
175 byteBuffer.clear();