Package de.gurkenlabs.litiengine.util.io
Class URLAdapter
This class allows for absolute and relative URLs to be unmarshalled as Java URL objects.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newURLAdapter, with no additional properties.URLAdapter(URL base) Constructs a newURLAdapter, configured to use relative URLs using the supplied URL as a base. -
Method Summary
-
Constructor Details
-
URLAdapter
public URLAdapter()Constructs a newURLAdapter, with no additional properties. This constructor is called if no configured instance is available to an unmarshaller. -
URLAdapter
Constructs a newURLAdapter, configured to use relative URLs using the supplied URL as a base.- Parameters:
base- The base URL to use- See Also:
-
-
Method Details
-
unmarshal
- Specified by:
unmarshalin classjakarta.xml.bind.annotation.adapters.XmlAdapter<String,URL> - Throws:
MalformedURLException
-
marshal
-
getBaseURL
Gets the base URL used by thisURLAdapterinstance.- Returns:
- The base URL used, or
nullif this instance has not been configured for relative URLs
-