Package com.aoindustries.net
Interface URIParameters
-
- All Superinterfaces:
Writable
- All Known Subinterfaces:
MutableURIParameters
- All Known Implementing Classes:
EmptyURIParameters
,UnmodifiableURIParameters
,URIParametersMap
public interface URIParameters extends Writable
Provides read-only access to URI parameters.- Author:
- AO Industries, Inc.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
appendTo(Encoder encoder, Appendable out)
default void
appendTo(Encoder encoder, Appendable out, long start, long end)
default void
appendTo(Appendable out)
default void
appendTo(Appendable out, long start, long end)
default long
getLength()
String
getParameter(String name)
Gets the value for the provided parameter name ornull
if doesn't exist.Map<String,List<String>>
getParameterMap()
Gets an unmodifiable map view of all parameters.Iterator<String>
getParameterNames()
Gets an unmodifiable iterator of the parameter names.List<String>
getParameterValues(String name)
Gets an unmodifiable view of all values for a multi-value parameter ornull
if has no values.default boolean
isFastToString()
String
toString()
Gets the query string encoded in the default encodingIRI.ENCODING
, not including the '?' prefix.default URIParameters
trim()
default void
writeTo(Encoder encoder, Writer out)
default void
writeTo(Encoder encoder, Writer out, long off, long len)
default void
writeTo(Writer out)
default void
writeTo(Writer out, long off, long len)
-
-
-
Method Detail
-
toString
String toString()
Gets the query string encoded in the default encodingIRI.ENCODING
, not including the '?' prefix.- Specified by:
toString
in interfaceWritable
- Overrides:
toString
in classObject
- See Also:
URIParametersUtils.toQueryString(com.aoindustries.net.URIParameters)
-
getParameter
String getParameter(String name)
Gets the value for the provided parameter name ornull
if doesn't exist. If the parameter has multiple values, the first value is returned.
-
getParameterNames
Iterator<String> getParameterNames()
Gets an unmodifiable iterator of the parameter names.
-
getParameterValues
List<String> getParameterValues(String name)
Gets an unmodifiable view of all values for a multi-value parameter ornull
if has no values.
-
getParameterMap
Map<String,List<String>> getParameterMap()
Gets an unmodifiable map view of all parameters.
-
getLength
default long getLength() throws IOException
- Specified by:
getLength
in interfaceWritable
- Throws:
IOException
-
isFastToString
default boolean isFastToString()
- Specified by:
isFastToString
in interfaceWritable
-
writeTo
default void writeTo(Writer out) throws IOException
- Specified by:
writeTo
in interfaceWritable
- Throws:
IOException
-
writeTo
default void writeTo(Writer out, long off, long len) throws IOException
- Specified by:
writeTo
in interfaceWritable
- Throws:
IOException
-
writeTo
default void writeTo(Encoder encoder, Writer out) throws IOException
- Specified by:
writeTo
in interfaceWritable
- Throws:
IOException
-
writeTo
default void writeTo(Encoder encoder, Writer out, long off, long len) throws IOException
- Specified by:
writeTo
in interfaceWritable
- Throws:
IOException
-
appendTo
default void appendTo(Appendable out) throws IOException
- Specified by:
appendTo
in interfaceWritable
- Throws:
IOException
- See Also:
URIParametersUtils.appendQueryString(com.aoindustries.net.URIParameters, java.lang.Appendable)
-
appendTo
default void appendTo(Appendable out, long start, long end) throws IOException
- Specified by:
appendTo
in interfaceWritable
- Throws:
IOException
-
appendTo
default void appendTo(Encoder encoder, Appendable out) throws IOException
- Specified by:
appendTo
in interfaceWritable
- Throws:
IOException
- See Also:
URIParametersUtils.appendQueryString(com.aoindustries.net.URIParameters, com.aoindustries.io.Encoder, java.lang.Appendable)
-
appendTo
default void appendTo(Encoder encoder, Appendable out, long start, long end) throws IOException
- Specified by:
appendTo
in interfaceWritable
- Throws:
IOException
-
trim
default URIParameters trim()
-
-