Home / Function/ getBytes() — netty Function Reference

getBytes() — netty Function Reference

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

Function java Buffer Search calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  a59272e8_83f1_4614_a108_aaa808356e48["getBytes()"]
  c3651b69_631a_1f76_b70c_086b089609c2["FixedCompositeByteBuf"]
  a59272e8_83f1_4614_a108_aaa808356e48 -->|defined in| c3651b69_631a_1f76_b70c_086b089609c2
  debfe023_76ba_b9e0_cdb5_f99303084c91["ByteBuf()"]
  debfe023_76ba_b9e0_cdb5_f99303084c91 -->|calls| a59272e8_83f1_4614_a108_aaa808356e48
  6cdaf76a_54de_8eca_a3fc_af93529f98b1["nioBufferCount()"]
  a59272e8_83f1_4614_a108_aaa808356e48 -->|calls| 6cdaf76a_54de_8eca_a3fc_af93529f98b1
  d5ccb74e_8331_ba41_6b91_072f8f658dd7["nioBuffers()"]
  a59272e8_83f1_4614_a108_aaa808356e48 -->|calls| d5ccb74e_8331_ba41_6b91_072f8f658dd7
  style a59272e8_83f1_4614_a108_aaa808356e48 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/FixedCompositeByteBuf.java lines 452–466

    @Override
    public int getBytes(int index, GatheringByteChannel out, int length)
            throws IOException {
        int count = nioBufferCount();
        if (count == 1) {
            return out.write(internalNioBuffer(index, length));
        } else {
            long writtenBytes = out.write(nioBuffers(index, length));
            if (writtenBytes > Integer.MAX_VALUE) {
                return Integer.MAX_VALUE;
            } else {
                return (int) writtenBytes;
            }
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does getBytes() do?
getBytes() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/FixedCompositeByteBuf.java.
Where is getBytes() defined?
getBytes() is defined in buffer/src/main/java/io/netty/buffer/FixedCompositeByteBuf.java at line 452.
What does getBytes() call?
getBytes() calls 2 function(s): nioBufferCount, nioBuffers.
What calls getBytes()?
getBytes() 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