org.restlet.engine.http.header

## Class ChallengeWriter

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

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

    public class ChallengeWriter
    extends HeaderWriter<ChallengeRequest>

Authentication challenge header writer.

Author:
  Jerome Louvel

### Field Summary

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

`lock`

### Constructor Summary

Constructors
Constructor and Description
`ChallengeWriter()` Constructor.

### Method Summary

Methods
`HeaderWriter<ChallengeRequest>` `append(ChallengeRequest value)` Appends a value.
`ChallengeWriter` `appendChallengeParameter(Parameter parameter)` Appends a new challenge parameter, prefixed with a comma.
`ChallengeWriter` `appendChallengeParameter(java.lang.String name)` Appends a new parameter, prefixed with a comma.
`ChallengeWriter` `appendChallengeParameter(java.lang.String name, java.lang.String value)` Appends a new parameter, prefixed with a comma.
`ChallengeWriter` `appendChallengeParameterSeparator()` Appends a comma as a separator if the first parameter has already been written.
`ChallengeWriter` `appendQuotedChallengeParameter(Parameter parameter)` Appends a new parameter, prefixed with a comma.
`ChallengeWriter` `appendQuotedChallengeParameter(java.lang.String name, java.lang.String value)` Appends a new parameter, prefixed with a comma.
`boolean` `isFirstChallengeParameter()` Indicates if the first comma-separated value is written.
`void` `setFirstChallengeParameter(boolean firstValue)` Indicates if the first comma-separated value is written.

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

`append, 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

#### ChallengeWriter

    public ChallengeWriter()

Constructor.

### Method Detail

#### append

    public HeaderWriter<ChallengeRequest> append(ChallengeRequest value)

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

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

#### appendChallengeParameter

    public ChallengeWriter appendChallengeParameter(Parameter parameter)

Appends a new challenge parameter, prefixed with a comma. The value is separated from the name by an '=' character.

Parameters:
  `parameter` - The parameter.
Returns:
  This writer.

#### appendChallengeParameter

    public ChallengeWriter appendChallengeParameter(java.lang.String name)

Appends a new parameter, prefixed with a comma.

Parameters:
  `name` - The parameter name.
Returns:
  The current builder.

#### appendChallengeParameter

    public ChallengeWriter appendChallengeParameter(java.lang.String name,
                                           java.lang.String value)

Appends a new parameter, prefixed with a comma. The value is separated from the name by an '=' character.

Parameters:
  `name` - The parameter name.
  `value` - The parameter value.
Returns:
  This writer.

#### appendChallengeParameterSeparator

    public ChallengeWriter appendChallengeParameterSeparator()

Appends a comma as a separator if the first parameter has already been written.

Returns:
  This writer.

#### appendQuotedChallengeParameter

    public ChallengeWriter appendQuotedChallengeParameter(Parameter parameter)

Appends a new parameter, prefixed with a comma. The value is separated from the name by an '=' character.

Parameters:
  `parameter` - The parameter.
Returns:
  This writer.

#### appendQuotedChallengeParameter

    public ChallengeWriter appendQuotedChallengeParameter(java.lang.String name,
                                                 java.lang.String value)

Appends a new parameter, prefixed with a comma. The value is quoted and separated from the name by an '=' character.

Parameters:
  `name` - The parameter name.
  `value` - The parameter value to quote.
Returns:
  This writer.

#### isFirstChallengeParameter

    public boolean isFirstChallengeParameter()

Indicates if the first comma-separated value is written.

Returns:
  True if the first comma-separated value is written.

#### setFirstChallengeParameter

    public void setFirstChallengeParameter(boolean firstValue)

Indicates if the first comma-separated value is written.

Parameters:
  `firstValue` - True if the first comma-separated value is written.