public class URLAdapter
extends javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.net.URL>
XmlJavaTypeAdapter| Constructor and Description |
|---|
URLAdapter()
Constructs a new
URLAdapter, with no additional properties. |
URLAdapter(java.net.URL base)
Constructs a new
URLAdapter, configured to use relative URLs using the supplied URL as a base. |
| Modifier and Type | Method and Description |
|---|---|
java.net.URL |
getBaseURL()
Gets the base URL used by this
URLAdapter instance. |
java.lang.String |
marshal(java.net.URL v) |
java.net.URL |
unmarshal(java.lang.String v) |
public URLAdapter()
URLAdapter, with no additional properties. This constructor is called if no configured instance is available to an
unmarshaller.public URLAdapter(java.net.URL base)
URLAdapter, configured to use relative URLs using the supplied URL as a base.base - The base URL to useUnmarshaller.setAdapter(XmlAdapter),
Marshaller.setAdapter(XmlAdapter)public java.net.URL unmarshal(java.lang.String v)
throws java.net.MalformedURLException
unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.net.URL>java.net.MalformedURLExceptionpublic java.lang.String marshal(java.net.URL v)
marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.net.URL>public java.net.URL getBaseURL()
URLAdapter instance.null if this instance has not been configured for relative URLs