Home / Function/ getBytes() — netty Function Reference

getBytes() — netty Function Reference

Architecture documentation for the getBytes() function in UnpooledDirectByteBuf.java from the netty codebase.

Function java Buffer Search calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  50c322d2_aa4f_64c6_4e46_a2781988e704["getBytes()"]
  9d6a7cd0_08a5_9155_3c10_b8a8fd6480e9["UnpooledDirectByteBuf"]
  50c322d2_aa4f_64c6_4e46_a2781988e704 -->|defined in| 9d6a7cd0_08a5_9155_3c10_b8a8fd6480e9
  9227405f_42f2_925d_5a57_145999e5270e["ByteBuf()"]
  9227405f_42f2_925d_5a57_145999e5270e -->|calls| 50c322d2_aa4f_64c6_4e46_a2781988e704
  83d2fed0_6483_d983_f3b4_4d261ce68091["readBytes()"]
  83d2fed0_6483_d983_f3b4_4d261ce68091 -->|calls| 50c322d2_aa4f_64c6_4e46_a2781988e704
  83d2fed0_6483_d983_f3b4_4d261ce68091["readBytes()"]
  50c322d2_aa4f_64c6_4e46_a2781988e704 -->|calls| 83d2fed0_6483_d983_f3b4_4d261ce68091
  style 50c322d2_aa4f_64c6_4e46_a2781988e704 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/UnpooledDirectByteBuf.java lines 375–385

    void getBytes(int index, byte[] dst, int dstIndex, int length, boolean internal) {
        checkDstIndex(index, length, dstIndex, dst.length);

        ByteBuffer tmpBuf;
        if (internal) {
            tmpBuf = internalNioBuffer(index, length);
        } else {
            tmpBuf = (ByteBuffer) buffer.duplicate().clear().position(index).limit(index + length);
        }
        tmpBuf.get(dst, dstIndex, length);
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does getBytes() do?
getBytes() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/UnpooledDirectByteBuf.java.
Where is getBytes() defined?
getBytes() is defined in buffer/src/main/java/io/netty/buffer/UnpooledDirectByteBuf.java at line 375.
What does getBytes() call?
getBytes() calls 1 function(s): readBytes.
What calls getBytes()?
getBytes() is called by 2 function(s): ByteBuf, readBytes.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free