Home / Function/ testGetReadOnlyDst() — netty Function Reference

testGetReadOnlyDst() — netty Function Reference

Architecture documentation for the testGetReadOnlyDst() function in AbstractByteBufTest.java from the netty codebase.

Function java Buffer Search called by 2

Entity Profile

Dependency Diagram

graph TD
  d43248ca_0095_043e_ec12_885c090627a7["testGetReadOnlyDst()"]
  6540f2d1_cdad_6705_dd1d_9a24e2e53242["AbstractByteBufTest"]
  d43248ca_0095_043e_ec12_885c090627a7 -->|defined in| 6540f2d1_cdad_6705_dd1d_9a24e2e53242
  f7d4da5a_e9ff_eaf5_3df4_aee421b03e19["testGetReadOnlyDirectDst()"]
  f7d4da5a_e9ff_eaf5_3df4_aee421b03e19 -->|calls| d43248ca_0095_043e_ec12_885c090627a7
  5e9eee07_d964_e2d3_3f04_6a4670038dd5["testGetReadOnlyHeapDst()"]
  5e9eee07_d964_e2d3_3f04_6a4670038dd5 -->|calls| d43248ca_0095_043e_ec12_885c090627a7
  style d43248ca_0095_043e_ec12_885c090627a7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java lines 5794–5810

    private void testGetReadOnlyDst(boolean direct) {
        byte[] bytes = { 'a', 'b', 'c', 'd' };

        ByteBuf buffer = newBuffer(bytes.length);
        buffer.writeBytes(bytes);

        ByteBuffer dst = direct ? ByteBuffer.allocateDirect(bytes.length) : ByteBuffer.allocate(bytes.length);
        ByteBuffer readOnlyDst = dst.asReadOnlyBuffer();
        try {
            buffer.getBytes(0, readOnlyDst);
            fail();
        } catch (ReadOnlyBufferException e) {
            // expected
        }
        assertEquals(0, readOnlyDst.position());
        buffer.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testGetReadOnlyDst() do?
testGetReadOnlyDst() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java.
Where is testGetReadOnlyDst() defined?
testGetReadOnlyDst() is defined in buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java at line 5794.
What calls testGetReadOnlyDst()?
testGetReadOnlyDst() is called by 2 function(s): testGetReadOnlyDirectDst, testGetReadOnlyHeapDst.

Analyze Your Own Codebase

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

Try Supermodel Free