Package org.mycore.common.content
Class MCRJAXBContent<T>
java.lang.Object
org.mycore.common.content.MCRContent
org.mycore.common.content.MCRXMLContent
org.mycore.common.content.MCRJAXBContent<T>
- Author:
- Thomas Scheffler (yagee)
-
Field Summary
Fields inherited from class org.mycore.common.content.MCRXMLContent
defaultFormat, format
Fields inherited from class org.mycore.common.content.MCRContent
docType, encoding, lastModified, length, mimeType, name, systemId, usingSession
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasXML()
Parses content, assuming it is XML, and returns the parsed document.Return the content as Sourcevoid
Sends content to the given local filevoid
sendTo
(OutputStream out) Sends content to the given OutputStream.Methods inherited from class org.mycore.common.content.MCRXMLContent
ensureXML, getETag, getInputStream, getMimeType, length, setEncoding, setFormat
Methods inherited from class org.mycore.common.content.MCRContent
asByteArray, asDataURL, asString, getContentInputStream, getDataURLEncoding, getDocType, getEncoding, getInputSource, getName, getReadableByteChannel, getReusableCopy, getSafeEncoding, getSimpleWeakETag, getSystemId, isReusable, isUsingSession, lastModified, sendTo, sendTo, setDocType, setLastModified, setMimeType, setName, setUsingSession
-
Constructor Details
-
MCRJAXBContent
-
-
Method Details
-
getObject
-
getSource
Description copied from class:MCRContent
Return the content as Source- Overrides:
getSource
in classMCRContent
- Returns:
- content as Source
- Throws:
IOException
-
sendTo
Description copied from class:MCRContent
Sends content to the given OutputStream. The OutputStream is NOT automatically closed afterwards.- Overrides:
sendTo
in classMCRContent
- Parameters:
out
- the OutputStream to write the content to- Throws:
IOException
-
sendTo
Description copied from class:MCRContent
Sends content to the given local file- Overrides:
sendTo
in classMCRContent
- Parameters:
target
- the file to write the content to- Throws:
IOException
-
asXML
Description copied from class:MCRContent
Parses content, assuming it is XML, and returns the parsed document.- Overrides:
asXML
in classMCRContent
- Returns:
- the XML document parsed from content
- Throws:
JDOMException
IOException
SAXParseException
-