Class ByteStorage<T>

    • Constructor Detail

      • ByteStorage

        public ByteStorage​(Function<T,​byte[]> extractor)
    • Method Detail

      • append

        public void append​(T frame)
        Description copied from interface: Storage
        Appends segmented frame.
        Specified by:
        append in interface Storage<T,​byte[]>
        Parameters:
        frame - Segmented frame.
      • size

        public long size()
        Description copied from interface: Storage
        Gets accumulated size of stored data.
        Specified by:
        size in interface Storage<T,​byte[]>
        Returns:
        Occupied memory in bytes.
      • get

        public byte[] get()
        Description copied from interface: Storage
        Retrieves final result from segmented payload.
        Specified by:
        get in interface Storage<T,​byte[]>
        Returns:
        Assembled result.