expand() — netty Function Reference
Architecture documentation for the expand() function in AppendableCharSequence.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d40dd526_f036_5cfa_1553_62b2628e159d["expand()"] 3c45deb3_208f_6378_979e_2c2209776324["AppendableCharSequence"] d40dd526_f036_5cfa_1553_62b2628e159d -->|defined in| 3c45deb3_208f_6378_979e_2c2209776324 49c064f7_8d1d_a660_a31e_56a0797dca17["AppendableCharSequence()"] 49c064f7_8d1d_a660_a31e_56a0797dca17 -->|calls| d40dd526_f036_5cfa_1553_62b2628e159d style d40dd526_f036_5cfa_1553_62b2628e159d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/internal/AppendableCharSequence.java lines 153–169
private static char[] expand(char[] array, int neededSpace, int size) {
int newCapacity = array.length;
do {
// double capacity until it is big enough
newCapacity <<= 1;
if (newCapacity < 0) {
throw new IllegalStateException();
}
} while (neededSpace > newCapacity);
char[] newArray = new char[newCapacity];
System.arraycopy(array, 0, newArray, 0, size);
return newArray;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does expand() do?
expand() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/AppendableCharSequence.java.
Where is expand() defined?
expand() is defined in common/src/main/java/io/netty/util/internal/AppendableCharSequence.java at line 153.
What calls expand()?
expand() is called by 1 function(s): AppendableCharSequence.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free