shiftComps() — netty Function Reference
Architecture documentation for the shiftComps() function in CompositeByteBuf.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0114e156_fe91_83e4_1f0e_ee7c6b36a88d["shiftComps()"] 6b8e4d93_5aed_4ff7_ccdd_9c021b0fe7d6["CompositeByteBuf"] 0114e156_fe91_83e4_1f0e_ee7c6b36a88d -->|defined in| 6b8e4d93_5aed_4ff7_ccdd_9c021b0fe7d6 e9920c4e_d91d_be1d_34e0_9c0ddc060f5d["CompositeByteBuf()"] e9920c4e_d91d_be1d_34e0_9c0ddc060f5d -->|calls| 0114e156_fe91_83e4_1f0e_ee7c6b36a88d 8421b4cd_91c2_2528_5e16_aaa6ada1145b["addComp()"] 8421b4cd_91c2_2528_5e16_aaa6ada1145b -->|calls| 0114e156_fe91_83e4_1f0e_ee7c6b36a88d style 0114e156_fe91_83e4_1f0e_ee7c6b36a88d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java lines 2363–2386
private void shiftComps(int i, int count) {
final int size = componentCount, newSize = size + count;
assert i >= 0 && i <= size && count > 0;
if (newSize > components.length) {
// grow the array
int newArrSize = Math.max(size + (size >> 1), newSize);
Component[] newArr;
if (i == size) {
newArr = Arrays.copyOf(components, newArrSize, Component[].class);
} else {
newArr = new Component[newArrSize];
if (i > 0) {
System.arraycopy(components, 0, newArr, 0, i);
}
if (i < size) {
System.arraycopy(components, i, newArr, i + count, size - i);
}
}
components = newArr;
} else if (i < size) {
System.arraycopy(components, i, components, i + count, size - i);
}
componentCount = newSize;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does shiftComps() do?
shiftComps() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java.
Where is shiftComps() defined?
shiftComps() is defined in buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java at line 2363.
What calls shiftComps()?
shiftComps() is called by 2 function(s): CompositeByteBuf, addComp.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free