Class ChunkedInput.FixedMultiBoundaryParser

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) byte[] getDelimiter​(byte b, int pos, byte[] delimiterBuffer)
      Selects a delimiter which corresponds to delimiter buffer.
      (package private) byte[] getDelimiter​(int pos, byte[] delimiterBuffer)
      Selects a delimiter which corresponds to delimiter buffer.
      (package private) int getDelimiterBufferSize()
      Returns a delimiter buffer size depending on the selected strategy.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • delimiters

        private final java.util.List<byte[]> delimiters
      • longestDelimiterLength

        private final int longestDelimiterLength
    • Constructor Detail

      • FixedMultiBoundaryParser

        public FixedMultiBoundaryParser​(java.lang.String... boundaries)
    • Method Detail

      • getDelimiter

        byte[] getDelimiter​(byte b,
                            int pos,
                            byte[] delimiterBuffer)
        Description copied from class: ChunkedInput.AbstractBoundaryParser
        Selects a delimiter which corresponds to delimiter buffer. Method automatically appends b param on the pos position of delimiterBuffer array and then starts the selection process with a newly created array.
        Specified by:
        getDelimiter in class ChunkedInput.AbstractBoundaryParser
        Parameters:
        b - byte which will be added on the pos position of delimiterBuffer array
        pos - number of bytes from the delimiter buffer which will be used in processing
        delimiterBuffer - current content of the delimiter buffer
        Returns:
        delimiter which corresponds to delimiterBuffer
      • getDelimiter

        byte[] getDelimiter​(int pos,
                            byte[] delimiterBuffer)
        Description copied from class: ChunkedInput.AbstractBoundaryParser
        Selects a delimiter which corresponds to delimiter buffer.
        Specified by:
        getDelimiter in class ChunkedInput.AbstractBoundaryParser
        Parameters:
        pos - position of the last read byte
        delimiterBuffer - number of bytes from the delimiter buffer which will be used in processing
        Returns:
        delimiter which corresponds to delimiterBuffer