Class URIWriter
java.lang.Object
org.exoplatform.web.controller.router.URIWriter
An uri writer.
-
Constructor Summary
ConstructorsConstructorDescriptionURIWriter(Appendable appendable) Create a new URI writer.URIWriter(Appendable appendable, MimeType mimeType) Create a new URI writer. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(char c) voidvoidappendQueryParameter(String parameterName, String paramaterValue) Append a query parameter to the parameter set.voidappendSegment(char c) Append a segment to the path.voidAppend a segment to the path.voidreset(Appendable appendable) Reset the writer for reuse.voidsetMimeType(MimeType mimeType)
-
Constructor Details
-
URIWriter
Create a new URI writer.- Parameters:
appendable- the appendablemimeType- the mime type- Throws:
NullPointerException- if the appendable argument is null
-
URIWriter
Create a new URI writer.- Parameters:
appendable- the appendable- Throws:
NullPointerException- if the appendable argument is null
-
-
Method Details
-
getMimeType
-
setMimeType
-
append
- Throws:
IOException
-
append
- Throws:
IOException
-
appendSegment
Append a segment to the path.- Parameters:
c- the char to append- Throws:
IllegalStateException- if a query parameter was already appendedIOException- any IO exception
-
appendSegment
Append a segment to the path.- Parameters:
s- the string to append.- Throws:
NullPointerException- if any argument value is nullIllegalStateException- if a query parameter was already appendedIOException- any IO exception
-
appendQueryParameter
public void appendQueryParameter(String parameterName, String paramaterValue) throws NullPointerException, IOException Append a query parameter to the parameter set. Note that the query parameters are ordered and the sequence of call to this method should be honoured when an URL is generated. Note also that the same parameter name can be used multiple times.- Parameters:
parameterName- the parameter nameparamaterValue- the parameter value- Throws:
NullPointerException- if any argument value is nullIOException- any IOException
-
reset
Reset the writer for reuse.- Parameters:
appendable- the used appendable
-