Package org.restlet.engine.header
Class EncodingWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.StringWriter
-
- org.restlet.engine.header.HeaderWriter<M>
-
- org.restlet.engine.header.MetadataWriter<org.restlet.data.Encoding>
-
- org.restlet.engine.header.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 Summary
Constructors Constructor Description EncodingWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanWrite(org.restlet.data.Encoding encoding)Indicates if the value can be written to the header.static java.lang.Stringwrite(java.util.List<org.restlet.data.Encoding> encodings)Writes a list of encodings.-
Methods inherited from class org.restlet.engine.header.MetadataWriter
append
-
Methods inherited from class org.restlet.engine.header.HeaderWriter
append, append, append, append, append, append, appendComment, appendExtension, appendExtension, appendParameterSeparator, appendProduct, appendQuotedPair, appendQuotedString, appendSpace, appendToken, appendUriEncoded, appendValueSeparator
-
-
-
-
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:HeaderWriterIndicates if the value can be written to the header. Useful to prevent the writing ofEncoding.IDENTITYconstants for example. By default it returns true for non null values.- Overrides:
canWritein classHeaderWriter<org.restlet.data.Encoding>- Parameters:
encoding- The value to add.- Returns:
- True if the value can be added.
-
-