MCPcopy Create free account
hub / github.com/ReadyTalk/avian / compact

Method compact

classpath/java/nio/CharBuffer.java:51–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 }
50
51 public CharBuffer compact() {
52 int remaining = remaining();
53
54 if (position != 0) {
55 CharBuffer b = slice();
56 position = 0;
57 put(b);
58 }
59
60 position = remaining;
61 limit(capacity());
62
63 return this;
64 }
65
66 public CharBuffer put(CharBuffer src) {
67 if (src.hasArray()) {

Callers 1

handleReadMethod · 0.45

Calls 5

sliceMethod · 0.95
putMethod · 0.95
remainingMethod · 0.45
limitMethod · 0.45
capacityMethod · 0.45

Tested by 1

handleReadMethod · 0.36