Package org.restlet.engine.header
Class ChallengeWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
Authentication challenge header writer.
- Author:
- Jerome Louvel
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(ChallengeRequest value) Appends a value.Appends a new parameter, prefixed with a comma.appendChallengeParameter(String name, String value) Appends a new parameter, prefixed with a comma.appendChallengeParameter(Parameter parameter) Appends a new challenge parameter, prefixed with a comma.Appends a comma as a separator if the first parameter has already been written.appendQuotedChallengeParameter(String name, String value) Appends a new parameter, prefixed with a comma.appendQuotedChallengeParameter(Parameter parameter) Appends a new parameter, prefixed with a comma.booleanIndicates if the first comma-separated value is written.voidsetFirstChallengeParameter(boolean firstValue) Indicates if the first comma-separated value is written.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, canWriteMethods inherited from class java.io.StringWriter
append, close, flush, getBuffer, toString, write, write, write, writeMethods inherited from class java.io.Writer
nullWriter, write
-
Constructor Details
-
ChallengeWriter
public ChallengeWriter()Constructor.
-
-
Method Details
-
append
Description copied from class:HeaderWriterAppends a value.- Specified by:
appendin classHeaderWriter<ChallengeRequest>- Parameters:
value- The value.- Returns:
- This writer.
-
appendChallengeParameter
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
Appends a new parameter, prefixed with a comma.- Parameters:
name- The parameter name.- Returns:
- The current builder.
-
appendChallengeParameter
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
Appends a comma as a separator if the first parameter has already been written.- Returns:
- This writer.
-
appendQuotedChallengeParameter
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
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.
-