Package com.github.sardine.util
Class SardineUtil
java.lang.Object
com.github.sardine.util.SardineUtil
Basic utility code. I borrowed some code from the webdavlib for
parsing dates.
- Author:
- jonstevens
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ElementcreateElement(QName key) static ElementcreateElement(Element parent, QName key) static QNamestatic QNamestatic DateLoops over all the possible date formats and tries to find the right one.static QNamestatic Stringstatic <T> Tunmarshal(InputStream in)
-
Field Details
-
CUSTOM_NAMESPACE_PREFIX
Default namespace prefix- See Also:
-
CUSTOM_NAMESPACE_URI
Default namespace URI- See Also:
-
DEFAULT_NAMESPACE_PREFIX
Default namespace prefix- See Also:
-
DEFAULT_NAMESPACE_URI
Default namespace URI- See Also:
-
-
Method Details
-
parseDate
Loops over all the possible date formats and tries to find the right one.- Parameters:
value- ISO date string- Returns:
- Null if there is a parsing failure
-
unmarshal
- Throws:
IOException
-
toXml
- Parameters:
jaxbElement- An object from the model- Returns:
- The XML string for the WebDAV request
- Throws:
RuntimeException- When there is a JAXB errorIOException
-
toQName
-
toQName
-
toQName
-
createQNameWithCustomNamespace
- Parameters:
key- Local element name.
-
createQNameWithDefaultNamespace
- Parameters:
key- Local element name.
-
createElement
- Parameters:
key- Fully qualified element name.
-
createElement
- Parameters:
key- Fully qualified element name.
-