setBytes() — netty Function Reference
Architecture documentation for the setBytes() function in UnpooledDirectByteBuf.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 309cf816_d9c0_1493_cf96_259956b16481["setBytes()"] 9d6a7cd0_08a5_9155_3c10_b8a8fd6480e9["UnpooledDirectByteBuf"] 309cf816_d9c0_1493_cf96_259956b16481 -->|defined in| 9d6a7cd0_08a5_9155_3c10_b8a8fd6480e9 9227405f_42f2_925d_5a57_145999e5270e["ByteBuf()"] 9227405f_42f2_925d_5a57_145999e5270e -->|calls| 309cf816_d9c0_1493_cf96_259956b16481 2211f485_6ecf_e1c4_faf2_15d096266b1c["hasArray()"] 309cf816_d9c0_1493_cf96_259956b16481 -->|calls| 2211f485_6ecf_e1c4_faf2_15d096266b1c 75e87141_8f09_39ab_83be_8362808dadcc["array()"] 309cf816_d9c0_1493_cf96_259956b16481 -->|calls| 75e87141_8f09_39ab_83be_8362808dadcc ed633a61_d03b_da4f_a64b_989aacb2a76e["arrayOffset()"] 309cf816_d9c0_1493_cf96_259956b16481 -->|calls| ed633a61_d03b_da4f_a64b_989aacb2a76e style 309cf816_d9c0_1493_cf96_259956b16481 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/main/java/io/netty/buffer/UnpooledDirectByteBuf.java lines 666–681
@Override
public int setBytes(int index, InputStream in, int length) throws IOException {
ensureAccessible();
if (buffer.hasArray()) {
return in.read(buffer.array(), buffer.arrayOffset() + index, length);
} else {
byte[] tmp = ByteBufUtil.threadLocalTempArray(length);
int readBytes = in.read(tmp, 0, length);
if (readBytes <= 0) {
return readBytes;
}
ByteBuffer tmpBuf = internalNioBuffer(index, readBytes);
tmpBuf.put(tmp, 0, readBytes);
return readBytes;
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does setBytes() do?
setBytes() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/UnpooledDirectByteBuf.java.
Where is setBytes() defined?
setBytes() is defined in buffer/src/main/java/io/netty/buffer/UnpooledDirectByteBuf.java at line 666.
What does setBytes() call?
setBytes() calls 3 function(s): array, arrayOffset, hasArray.
What calls setBytes()?
setBytes() is called by 1 function(s): ByteBuf.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free