Home / Function/ writeBytes() — netty Function Reference

writeBytes() — netty Function Reference

Architecture documentation for the writeBytes() function in ByteBufOutputStream.java from the netty codebase.

Function java Buffer Search called by 1

Entity Profile

Dependency Diagram

graph TD
  a7aede63_7efc_99b6_3c91_428c0daab5c3["writeBytes()"]
  b0f015ed_c496_fa06_0ae3_0f347b86e7ca["ByteBufOutputStream"]
  a7aede63_7efc_99b6_3c91_428c0daab5c3 -->|defined in| b0f015ed_c496_fa06_0ae3_0f347b86e7ca
  8948913d_f22f_05e9_f243_f3e88633649d["write()"]
  8948913d_f22f_05e9_f243_f3e88633649d -->|calls| a7aede63_7efc_99b6_3c91_428c0daab5c3
  style a7aede63_7efc_99b6_3c91_428c0daab5c3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/ByteBufOutputStream.java lines 98–110

    @Override
    public void writeBytes(String s) throws IOException {
        // We don't use `ByteBuf.writeCharSequence` here, because `writeBytes` is specified to only write the
        // lower-order by of multibyte characters (exactly one byte per character in the string), while
        // `writeCharSequence` will instead write a '?' replacement character.
        int length = s.length();
        buffer.ensureWritable(length);
        int offset = buffer.writerIndex();
        for (int i = 0; i < length; i++) {
            buffer.setByte(offset + i, (byte) s.charAt(i));
        }
        buffer.writerIndex(offset + length);
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does writeBytes() do?
writeBytes() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/ByteBufOutputStream.java.
Where is writeBytes() defined?
writeBytes() is defined in buffer/src/main/java/io/netty/buffer/ByteBufOutputStream.java at line 98.
What calls writeBytes()?
writeBytes() is called by 1 function(s): write.

Analyze Your Own Codebase

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

Try Supermodel Free