Class EncodingWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable

    public class EncodingWriter
    extends MetadataWriter<org.restlet.data.Encoding>
    Encoding header writer.
    Author:
    Jerome Louvel
    • Constructor Detail

      • EncodingWriter

        public EncodingWriter()
    • Method Detail

      • write

        public static java.lang.String write​(java.util.List<org.restlet.data.Encoding> encodings)
        Writes a list of encodings.
        Parameters:
        encodings - The encodings to write.
        Returns:
        This writer.
      • canWrite

        protected boolean canWrite​(org.restlet.data.Encoding encoding)
        Description copied from class: HeaderWriter
        Indicates if the value can be written to the header. Useful to prevent the writing of Encoding.IDENTITY constants for example. By default it returns true for non null values.
        Overrides:
        canWrite in class HeaderWriter<org.restlet.data.Encoding>
        Parameters:
        encoding - The value to add.
        Returns:
        True if the value can be added.