org.restlet.engine.http.header

## Class DimensionWriter

- java.lang.Object
- - java.io.Writer
  - - java.io.StringWriter
    - - org.restlet.engine.http.header.HeaderWriter<Dimension>
      - - org.restlet.engine.http.header.DimensionWriter

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

    public class DimensionWriter
    extends HeaderWriter<Dimension>

Dimension header writer.

Author:
  Thierry Boileau

### Field Summary

### Fields inherited from class java.io.Writer

`lock`

### Constructor Summary

Constructors
Constructor and Description
`DimensionWriter()`

### Method Summary

Methods
`DimensionWriter` `append(java.util.Collection<Dimension> dimensions)` Appends a collection of dimensions as a header.
`HeaderWriter<Dimension>` `append(Dimension dimension)` Appends a value.
`static java.lang.String` `write(java.util.Collection<Dimension> dimensions)` Creates a vary header from the given dimensions.

### Methods inherited from class org.restlet.engine.http.header.HeaderWriter

`append, append, append, append, append, appendComment, appendExtension, appendExtension, appendParameterSeparator, appendProduct, appendQuotedPair, appendQuotedString, appendSpace, appendToken, appendUriEncoded, appendValueSeparator, canWrite`

### 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

#### DimensionWriter

    public DimensionWriter()

### Method Detail

#### write

    public static java.lang.String write(java.util.Collection<Dimension> dimensions)

Creates a vary header from the given dimensions.

Parameters:
  `dimensions` - The dimensions to copy to the response.
Returns:
  Returns the Vary header or null, if dimensions is null or empty.

#### append

    public DimensionWriter append(java.util.Collection<Dimension> dimensions)

Appends a collection of dimensions as a header.

Overrides:
  `append` in class `HeaderWriter<Dimension>`
Parameters:
  `dimensions` - The dimensions to format.
Returns:
  This writer.

#### append

    public HeaderWriter<Dimension> append(Dimension dimension)

Description copied from class: `HeaderWriter`
Appends a value.

Specified by:
  `append` in class `HeaderWriter<Dimension>`
Parameters:
  `dimension` - The value.
Returns:
  This writer.