org.restlet.engine.header
Class EncodingWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.StringWriter
          extended by org.restlet.engine.header.HeaderWriter<M>
              extended by org.restlet.engine.header.MetadataWriter<Encoding>
                  extended by org.restlet.engine.header.EncodingWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class EncodingWriter
extends MetadataWriter<Encoding>

Encoding header writer.

Author:
Jerome Louvel

Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
EncodingWriter()
           
 
Method Summary
protected  boolean canWrite(Encoding encoding)
          Indicates if the value can be written to the header.
static String write(List<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
 
Methods inherited from class java.io.StringWriter
append, close, flush, getBuffer, toString, write, write, write, write
 
Methods inherited from class java.io.Writer
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EncodingWriter

public EncodingWriter()
Method Detail

write

public static String write(List<Encoding> encodings)
Writes a list of encodings.

Parameters:
encodings - The encodings to write.
Returns:
This writer.

canWrite

protected boolean canWrite(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<Encoding>
Parameters:
encoding - The value to add.
Returns:
True if the value can be added.


Copyright © 2005-2013 Restlet.