Package org.ocpsoft.urlbuilder
Class AddressBuilder
java.lang.Object
org.ocpsoft.urlbuilder.AddressBuilder
Representation of a uniform resource locator, or web address. Internal state is stored as it is originally provided,
and must be encoded or decoded as necessary.
- Author:
- Lincoln Baxter, III
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CharSequenceprotected CharSequenceprotected Map<CharSequence,org.ocpsoft.urlbuilder.Parameter> protected CharSequenceprotected Integerprotected Map<CharSequence,org.ocpsoft.urlbuilder.Parameter> protected CharSequenceprotected CharSequence -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AddressBuilderBasebegin()Create a newAddressBuilderinstance.protected Addressbuild()Generate anAddressrepresenting the current state of thisAddressBuilder.protected AddressGenerate anAddressrepresenting the current literal state of thisAddressBuilder.static AddressCreate a newAddressfrom the given URL.toString()
-
Field Details
-
scheme
-
schemeSpecificPart
-
domain
-
port
-
path
-
parameters
-
queries
-
anchor
-
-
Constructor Details
-
AddressBuilder
protected AddressBuilder()
-
-
Method Details
-
begin
Create a newAddressBuilderinstance. -
build
Generate anAddressrepresenting the current state of thisAddressBuilder. -
buildLiteral
Generate anAddressrepresenting the current literal state of thisAddressBuilder.(Does not apply parameterization. E.g. The URL `/{foo}` will be treated as literal text, as opposed to calling
build(), which would result in `foo` being treated as a parameterized expression) -
create
Create a newAddressfrom the given URL. Improperly formatted or encoded URLs are not parse-able and will result in an exception. No builder parameterization is possible using this method.- Throws:
IllegalArgumentException- when the input URL or URL fragment is not valid.
-
toString
-