Class RFC2616Codec

    • Constructor Detail

      • RFC2616Codec

        public RFC2616Codec()
    • Method Detail

      • isToken

        public static boolean isToken​(@Nullable
                                      char[] aChars)
      • isMaybeEncoded

        public static boolean isMaybeEncoded​(@Nullable
                                             String s)
      • isMaybeEncoded

        public static boolean isMaybeEncoded​(@Nullable
                                             char[] s)
      • getEncodedLength

        @Nonnegative
        @Deprecated
        public int getEncodedLength​(@Nonnegative
                                    int nDecodedLen)
        Get the maximum encoded length based on the provided decoded length. This is purely for performance reasons. The name of the method would be better called "getMaximumEncodedLength".
        Parameters:
        nDecodedLen - The decoded length. Always ≥ 0.
        Returns:
        The maximum encoded length. Always ≥ 0.
      • getMaximumDecodedLength

        @Nonnegative
        public int getMaximumDecodedLength​(@Nonnegative
                                           int nEncodedLen)
        Description copied from interface: ICharArrayDecoder
        Get the maximum decoded length based on the provided encoded length. This is purely for performance reasons.
        Specified by:
        getMaximumDecodedLength in interface ICharArrayDecoder
        Parameters:
        nEncodedLen - The encoded length. Always ≥ 0.
        Returns:
        The maximum decoded length. Always ≥ 0.
      • decode

        public void decode​(@Nullable
                           char[] aEncodedBuffer,
                           @Nonnegative
                           int nOfs,
                           @Nonnegative
                           int nLen,
                           @Nonnull @WillNotClose
                           Writer aWriter)
        Description copied from interface: ICharArrayStreamDecoder
        Decode (part of) a char array.
        Specified by:
        decode in interface ICharArrayStreamDecoder
        Parameters:
        aEncodedBuffer - The char array to be decoded. May be null.
        nOfs - Offset into the char array to start from.
        nLen - Number of chars starting from offset to consider.
        aWriter - The writer to write to. May not be null and is NOT closed afterwards!