testStreamTransfer1() — netty Function Reference
Architecture documentation for the testStreamTransfer1() function in AbstractByteBufTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5f5d557a_bb9e_38f0_2645_9264a8650ca6["testStreamTransfer1()"] 6540f2d1_cdad_6705_dd1d_9a24e2e53242["AbstractByteBufTest"] 5f5d557a_bb9e_38f0_2645_9264a8650ca6 -->|defined in| 6540f2d1_cdad_6705_dd1d_9a24e2e53242 style 5f5d557a_bb9e_38f0_2645_9264a8650ca6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java lines 2000–2017
@Test
public void testStreamTransfer1() throws Exception {
byte[] expected = new byte[buffer.capacity()];
random.nextBytes(expected);
for (int i = 0; i < buffer.capacity() - BLOCK_SIZE + 1; i += BLOCK_SIZE) {
ByteArrayInputStream in = new ByteArrayInputStream(expected, i, BLOCK_SIZE);
assertEquals(BLOCK_SIZE, buffer.setBytes(i, in, BLOCK_SIZE));
assertEquals(-1, buffer.setBytes(i, in, 0));
}
ByteArrayOutputStream out = new ByteArrayOutputStream();
for (int i = 0; i < buffer.capacity() - BLOCK_SIZE + 1; i += BLOCK_SIZE) {
buffer.getBytes(i, out, BLOCK_SIZE);
}
assertTrue(Arrays.equals(expected, out.toByteArray()));
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testStreamTransfer1() do?
testStreamTransfer1() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java.
Where is testStreamTransfer1() defined?
testStreamTransfer1() is defined in buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java at line 2000.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free