Home / Function/ ByteBuffer() — netty Function Reference

ByteBuffer() — netty Function Reference

Architecture documentation for the ByteBuffer() function in SSLEngineTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  b58c9767_2d12_dbd9_a6f6_7aee249aaec0["ByteBuffer()"]
  9150c92a_2afc_b83a_c3bf_86dfac6e9d9b["SSLEngineTest"]
  b58c9767_2d12_dbd9_a6f6_7aee249aaec0 -->|defined in| 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b
  style b58c9767_2d12_dbd9_a6f6_7aee249aaec0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java lines 310–322

    protected ByteBuffer allocateBuffer(BufferType type, int len) {
        switch (type) {
            case Direct:
                return ByteBuffer.allocateDirect(len);
            case Heap:
                return ByteBuffer.allocate(len);
            case Mixed:
                return ThreadLocalRandom.current().nextBoolean() ?
                        ByteBuffer.allocateDirect(len) : ByteBuffer.allocate(len);
            default:
                throw new Error("Unexpected buffer type: " + type);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does ByteBuffer() do?
ByteBuffer() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java.
Where is ByteBuffer() defined?
ByteBuffer() is defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java at line 310.

Analyze Your Own Codebase

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

Try Supermodel Free