Home / Function/ setBytes() — netty Function Reference

setBytes() — netty Function Reference

Architecture documentation for the setBytes() function in ByteBufAccessBenchmark.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d3bda5c2_7f31_ed00_642f_ef9b903e9090["setBytes()"]
  bbe8e86b_057f_5aa0_71ed_6d8276f6f6f8["ByteBufAccessBenchmark"]
  d3bda5c2_7f31_ed00_642f_ef9b903e9090 -->|defined in| bbe8e86b_057f_5aa0_71ed_6d8276f6f6f8
  style d3bda5c2_7f31_ed00_642f_ef9b903e9090 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

microbench/src/main/java/io/netty/buffer/ByteBufAccessBenchmark.java lines 236–252

    @Benchmark
    public void setBytes(Blackhole bh) {
        ByteBuf buffer = this.buffer;
        byte byteToWrite = this.byteToWrite;
        int intToWrite = this.intToWrite;
        long longToWrite = this.longToWrite;
        short shortToWrite = this.shortToWrite;
        buffer.resetWriterIndex();
        int index = buffer.writerIndex();
        bh.consume(buffer.setByte(index, byteToWrite));
        index += 1;
        bh.consume(buffer.setShortLE(index, shortToWrite));
        index += 2;
        bh.consume(buffer.setIntLE(index, intToWrite));
        index += 4;
        bh.consume(buffer.setLongLE(index, longToWrite));
    }

Domain

Subdomains

Frequently Asked Questions

What does setBytes() do?
setBytes() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/buffer/ByteBufAccessBenchmark.java.
Where is setBytes() defined?
setBytes() is defined in microbench/src/main/java/io/netty/buffer/ByteBufAccessBenchmark.java at line 236.

Analyze Your Own Codebase

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

Try Supermodel Free