Home / Function/ copyTo() — netty Function Reference

copyTo() — netty Function Reference

Architecture documentation for the copyTo() function in CompositeByteBuf.java from the netty codebase.

Function java Buffer Search calls 3 called by 1

Entity Profile

Dependency Diagram

graph TD
  e0356282_dad7_04a6_19b9_c66040e8e243["copyTo()"]
  6b8e4d93_5aed_4ff7_ccdd_9c021b0fe7d6["CompositeByteBuf"]
  e0356282_dad7_04a6_19b9_c66040e8e243 -->|defined in| 6b8e4d93_5aed_4ff7_ccdd_9c021b0fe7d6
  ab122f34_311d_08f3_ea76_dfd965d4ae24["ByteBuf()"]
  ab122f34_311d_08f3_ea76_dfd965d4ae24 -->|calls| e0356282_dad7_04a6_19b9_c66040e8e243
  ef81abf8_e155_b7e4_fb6e_952e0170c90f["getBytes()"]
  e0356282_dad7_04a6_19b9_c66040e8e243 -->|calls| ef81abf8_e155_b7e4_fb6e_952e0170c90f
  d3be0b0f_c8ba_dc16_970f_8a5302e005af["idx()"]
  e0356282_dad7_04a6_19b9_c66040e8e243 -->|calls| d3be0b0f_c8ba_dc16_970f_8a5302e005af
  8b40bcf2_a1f9_fa88_113f_04b3bb1e18c3["capacity()"]
  e0356282_dad7_04a6_19b9_c66040e8e243 -->|calls| 8b40bcf2_a1f9_fa88_113f_04b3bb1e18c3
  style e0356282_dad7_04a6_19b9_c66040e8e243 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java lines 1531–1546

    private void copyTo(int index, int length, int componentId, ByteBuf dst) {
        int dstIndex = 0;
        int i = componentId;

        while (length > 0) {
            Component c = components[i];
            int localLength = Math.min(length, c.endOffset - index);
            c.buf.getBytes(c.idx(index), dst, dstIndex, localLength);
            index += localLength;
            dstIndex += localLength;
            length -= localLength;
            i ++;
        }

        dst.writerIndex(dst.capacity());
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does copyTo() do?
copyTo() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java.
Where is copyTo() defined?
copyTo() is defined in buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java at line 1531.
What does copyTo() call?
copyTo() calls 3 function(s): capacity, getBytes, idx.
What calls copyTo()?
copyTo() 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