MCPcopy Create free account
hub / github.com/davidgiven/luje / copy

Method copy

lib/java/nio/ReadOnlyShortArrayBuffer.java:34–41  ·  view source on GitHub ↗
(ShortArrayBuffer other, int markOfOther)

Source from the content-addressed store, hash-verified

32final class ReadOnlyShortArrayBuffer extends ShortArrayBuffer {
33
34 static ReadOnlyShortArrayBuffer copy(ShortArrayBuffer other, int markOfOther) {
35 ReadOnlyShortArrayBuffer buf = new ReadOnlyShortArrayBuffer(other
36 .capacity(), other.backingArray, other.offset);
37 buf.limit = other.limit();
38 buf.position = other.position();
39 buf.mark = markOfOther;
40 return buf;
41 }
42
43 ReadOnlyShortArrayBuffer(int capacity, short[] backingArray, int arrayOffset) {
44 super(capacity, backingArray, arrayOffset);

Callers 2

duplicateMethod · 0.95
asReadOnlyBufferMethod · 0.95

Calls 3

limitMethod · 0.80
positionMethod · 0.80
capacityMethod · 0.45

Tested by

no test coverage detected