Package io.aether.utils.streams
Class Accumulator
- java.lang.Object
-
- io.aether.utils.streams.Accumulator
-
- All Implemented Interfaces:
io.aether.utils.interfaces.ObjectFind,Node<byte[],byte[],byte[],byte[]>,NodeDown<byte[],byte[]>,NodeUp<byte[],byte[]>,io.aether.utils.ToString
public class Accumulator extends java.lang.Object implements Node<byte[],byte[],byte[],byte[]>
Accumulator node that processes Value objects.When receiving data from the upper gate (up), it prepends a size header to the byte array and sends it down. When receiving data from the lower gate (down), it reads the size header first, then accumulates incoming bytes until the full data packet is received, and finally sends the reconstructed Value up.
This class ensures proper framing of byte arrays with size headers for reliable transmission.
-
-
Constructor Summary
Constructors Constructor Description Accumulator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FGate<byte[],byte[]>gDown()FGate<byte[],byte[]>gUp()static Gate<byte[],byte[]>of(Gate<byte[],byte[]> down)java.lang.StringtoString()voidtoString(io.aether.utils.AString sb)
-