Interface ByteProcessor<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T getResult()
      Return the result of processing all the bytes.
      boolean processBytes(byte[] buf, int off, int len)
      This method will be called for each chunk of bytes in an input stream.
    • Method Detail

      • processBytes

        @CanIgnoreReturnValue
        boolean processBytes(byte[] buf,
                             int off,
                             int len)
                      throws IOException
        This method will be called for each chunk of bytes in an input stream. The implementation should process the bytes from buf[off] through buf[off + len - 1] (inclusive).
        Parameters:
        buf - the byte array containing the data to process
        off - the initial offset into the array
        len - the length of data to be processed
        Returns:
        true to continue processing, false to stop
        Throws:
        IOException
      • getResult

        T getResult()
        Return the result of processing all the bytes.