Class NoneEncoder

    • Constructor Detail

      • NoneEncoder

        public NoneEncoder()
    • Method Detail

      • encode

        public java.lang.Object encode​(java.lang.Object o)
        Description copied from interface: Encoder
        Encode given input object
        Specified by:
        encode in interface Encoder
        Parameters:
        o - the input object
        Returns:
        the encoded object
      • isSafe

        public boolean isSafe()
        Description copied from interface: Encoder
        Checks if this encoder is XSS "safe". This means that after appling this encoder, the characters have been escaped and are XSS safe to be included in HTML documents.
        Specified by:
        isSafe in interface Encoder
        Returns:
        true, if is safe
      • isApplyToSafelyEncoded

        public boolean isApplyToSafelyEncoded()
        Specified by:
        isApplyToSafelyEncoded in interface Encoder
        Returns:
        true if this this codec should be applied to a buffer part that is already encoded with a safe encoder
      • markEncoded

        public void markEncoded​(java.lang.CharSequence string)
        Description copied from interface: Encoder
        Mark this instance as encoded with this encoder in the current EncodingStateRegistry
        Specified by:
        markEncoded in interface Encoder
        Parameters:
        string - a CharSequence to mark as encoded
      • encodeToStream

        public void encodeToStream​(Encoder thisInstance,
                                   java.lang.CharSequence source,
                                   int offset,
                                   int len,
                                   EncodedAppender appender,
                                   EncodingState encodingState)
                            throws java.io.IOException
        Description copied from interface: StreamingEncoder
        Encode and append portion of source CharSequence to the appender.
        Specified by:
        encodeToStream in interface StreamingEncoder
        source - The source CharSequence
        offset - Offset from which to start encoding characters
        len - Number of characters to encode
        appender - the appender to write to
        encodingState - the current encoding state
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.