| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>JAXB</title> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="JAXB"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../jakarta/xml/bind/Element.html" title="interface in jakarta.xml.bind"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?jakarta/xml/bind/JAXB.html" target="_top">Frames</a></li> |
| <li><a href="JAXB.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">jakarta.xml.bind</div> |
| <h2 title="Class JAXB" class="title">Class JAXB</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>jakarta.xml.bind.JAXB</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public final class <span class="typeNameLabel">JAXB</span> |
| extends java.lang.Object</pre> |
| <div class="block">Class that defines convenience methods for common, simple use of JAXB. |
| |
| <p> |
| Methods defined in this class are convenience methods that combine several basic operations |
| in the <a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><code>JAXBContext</code></a>, <a href="../../../jakarta/xml/bind/Unmarshaller.html" title="interface in jakarta.xml.bind"><code>Unmarshaller</code></a>, and <a href="../../../jakarta/xml/bind/Marshaller.html" title="interface in jakarta.xml.bind"><code>Marshaller</code></a>. |
| |
| They are designed |
| to be the prefered methods for developers new to JAXB. They have |
| the following characterstics: |
| |
| <ol> |
| <li>Generally speaking, the performance is not necessarily optimal. |
| It is expected that people who need to write performance |
| critical code will use the rest of the JAXB API directly. |
| <li>Errors that happen during the processing is wrapped into |
| <a href="../../../jakarta/xml/bind/DataBindingException.html" title="class in jakarta.xml.bind"><code>DataBindingException</code></a> (which will have <a href="../../../jakarta/xml/bind/JAXBException.html" title="class in jakarta.xml.bind"><code>JAXBException</code></a> |
| as its <code>cause</code>. It is expected that |
| people who prefer the checked exception would use |
| the rest of the JAXB API directly. |
| </ol> |
| |
| <p> |
| In addition, the <code>unmarshal</code> methods have the following characteristic: |
| |
| <ol> |
| <li>Schema validation is not performed on the input XML. |
| The processing will try to continue even if there |
| are errors in the XML, as much as possible. Only as |
| the last resort, this method fails with <a href="../../../jakarta/xml/bind/DataBindingException.html" title="class in jakarta.xml.bind"><code>DataBindingException</code></a>. |
| </ol> |
| |
| <p> |
| Similarly, the <code>marshal</code> methods have the following characteristic: |
| <ol> |
| <li>The processing will try to continue even if the Java object tree |
| does not meet the validity requirement. Only as |
| the last resort, this method fails with <a href="../../../jakarta/xml/bind/DataBindingException.html" title="class in jakarta.xml.bind"><code>DataBindingException</code></a>. |
| </ol> |
| |
| |
| <p> |
| All the methods on this class require non-null arguments to all parameters. |
| The <code>unmarshal</code> methods either fail with an exception or return |
| a non-null value.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.6, JAXB 2.1</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#marshal-java.lang.Object-java.io.File-">marshal</a></span>(java.lang.Object jaxbObject, |
| java.io.File xml)</code> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#marshal-java.lang.Object-java.io.OutputStream-">marshal</a></span>(java.lang.Object jaxbObject, |
| java.io.OutputStream xml)</code> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#marshal-java.lang.Object-javax.xml.transform.Result-">marshal</a></span>(java.lang.Object jaxbObject, |
| javax.xml.transform.Result xml)</code> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#marshal-java.lang.Object-java.lang.String-">marshal</a></span>(java.lang.Object jaxbObject, |
| java.lang.String xml)</code> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#marshal-java.lang.Object-java.net.URI-">marshal</a></span>(java.lang.Object jaxbObject, |
| java.net.URI xml)</code> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#marshal-java.lang.Object-java.net.URL-">marshal</a></span>(java.lang.Object jaxbObject, |
| java.net.URL xml)</code> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#marshal-java.lang.Object-java.io.Writer-">marshal</a></span>(java.lang.Object jaxbObject, |
| java.io.Writer xml)</code> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#unmarshal-java.io.File-java.lang.Class-">unmarshal</a></span>(java.io.File xml, |
| java.lang.Class<T> type)</code> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#unmarshal-java.io.InputStream-java.lang.Class-">unmarshal</a></span>(java.io.InputStream xml, |
| java.lang.Class<T> type)</code> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#unmarshal-java.io.Reader-java.lang.Class-">unmarshal</a></span>(java.io.Reader xml, |
| java.lang.Class<T> type)</code> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#unmarshal-javax.xml.transform.Source-java.lang.Class-">unmarshal</a></span>(javax.xml.transform.Source xml, |
| java.lang.Class<T> type)</code> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#unmarshal-java.lang.String-java.lang.Class-">unmarshal</a></span>(java.lang.String xml, |
| java.lang.Class<T> type)</code> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#unmarshal-java.net.URI-java.lang.Class-">unmarshal</a></span>(java.net.URI xml, |
| java.lang.Class<T> type)</code> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/xml/bind/JAXB.html#unmarshal-java.net.URL-java.lang.Class-">unmarshal</a></span>(java.net.URL xml, |
| java.lang.Class<T> type)</code> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="unmarshal-java.io.File-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre>public static <T> T unmarshal(java.io.File xml, |
| java.lang.Class<T> type)</pre> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>xml</code> - Reads the entire file as XML.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="unmarshal-java.net.URL-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre>public static <T> T unmarshal(java.net.URL xml, |
| java.lang.Class<T> type)</pre> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>xml</code> - The resource pointed by the URL is read in its entirety.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="unmarshal-java.net.URI-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre>public static <T> T unmarshal(java.net.URI xml, |
| java.lang.Class<T> type)</pre> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>xml</code> - The URI is <code>turned into URL</code> and then |
| follows the handling of <code>URL</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="unmarshal-java.lang.String-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre>public static <T> T unmarshal(java.lang.String xml, |
| java.lang.Class<T> type)</pre> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>xml</code> - The string is first interpreted as an absolute <code>URI</code>. |
| If it's not <code>a valid absolute URI</code>, |
| then it's interpreted as a <code>File</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="unmarshal-java.io.InputStream-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre>public static <T> T unmarshal(java.io.InputStream xml, |
| java.lang.Class<T> type)</pre> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>xml</code> - The entire stream is read as an XML infoset. |
| Upon a successful completion, the stream will be closed by this method.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="unmarshal-java.io.Reader-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre>public static <T> T unmarshal(java.io.Reader xml, |
| java.lang.Class<T> type)</pre> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>xml</code> - The character stream is read as an XML infoset. |
| The encoding declaration in the XML will be ignored. |
| Upon a successful completion, the stream will be closed by this method.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="unmarshal-javax.xml.transform.Source-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unmarshal</h4> |
| <pre>public static <T> T unmarshal(javax.xml.transform.Source xml, |
| java.lang.Class<T> type)</pre> |
| <div class="block">Reads in a Java object tree from the given XML input.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>xml</code> - The XML infoset that the <code>Source</code> represents is read.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="marshal-java.lang.Object-java.io.File-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>marshal</h4> |
| <pre>public static void marshal(java.lang.Object jaxbObject, |
| java.io.File xml)</pre> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>jaxbObject</code> - The Java object to be marshalled into XML. If this object is |
| a <a href="../../../jakarta/xml/bind/JAXBElement.html" title="class in jakarta.xml.bind"><code>JAXBElement</code></a>, it will provide the root tag name and |
| the body. If this object has <a href="../../../jakarta/xml/bind/annotation/XmlRootElement.html" title="annotation in jakarta.xml.bind.annotation"><code>XmlRootElement</code></a> |
| on its class definition, that will be used as the root tag name |
| and the given object will provide the body. Otherwise, |
| the root tag name is <code>infered</code> from |
| <code>the short class name</code>. |
| This parameter must not be null.</dd> |
| <dd><code>xml</code> - XML will be written to this file. If it already exists, |
| it will be overwritten.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/DataBindingException.html" title="class in jakarta.xml.bind">DataBindingException</a></code> - If the operation fails, such as due to I/O error, unbindable classes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="marshal-java.lang.Object-java.net.URL-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>marshal</h4> |
| <pre>public static void marshal(java.lang.Object jaxbObject, |
| java.net.URL xml)</pre> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>jaxbObject</code> - The Java object to be marshalled into XML. If this object is |
| a <a href="../../../jakarta/xml/bind/JAXBElement.html" title="class in jakarta.xml.bind"><code>JAXBElement</code></a>, it will provide the root tag name and |
| the body. If this object has <a href="../../../jakarta/xml/bind/annotation/XmlRootElement.html" title="annotation in jakarta.xml.bind.annotation"><code>XmlRootElement</code></a> |
| on its class definition, that will be used as the root tag name |
| and the given object will provide the body. Otherwise, |
| the root tag name is <code>infered</code> from |
| <code>the short class name</code>. |
| This parameter must not be null.</dd> |
| <dd><code>xml</code> - The XML will be <code>sent</code> to the |
| resource pointed by this URL. Note that not all <code>URL</code>s support |
| such operation, and exact semantics depends on the <code>URL</code> |
| implementations. In case of <code>HTTP URLs</code>, |
| this will perform HTTP POST.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/DataBindingException.html" title="class in jakarta.xml.bind">DataBindingException</a></code> - If the operation fails, such as due to I/O error, unbindable classes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="marshal-java.lang.Object-java.net.URI-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>marshal</h4> |
| <pre>public static void marshal(java.lang.Object jaxbObject, |
| java.net.URI xml)</pre> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>jaxbObject</code> - The Java object to be marshalled into XML. If this object is |
| a <a href="../../../jakarta/xml/bind/JAXBElement.html" title="class in jakarta.xml.bind"><code>JAXBElement</code></a>, it will provide the root tag name and |
| the body. If this object has <a href="../../../jakarta/xml/bind/annotation/XmlRootElement.html" title="annotation in jakarta.xml.bind.annotation"><code>XmlRootElement</code></a> |
| on its class definition, that will be used as the root tag name |
| and the given object will provide the body. Otherwise, |
| the root tag name is <code>infered</code> from |
| <code>the short class name</code>. |
| This parameter must not be null.</dd> |
| <dd><code>xml</code> - The URI is <code>turned into URL</code> and then |
| follows the handling of <code>URL</code>. See above.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/DataBindingException.html" title="class in jakarta.xml.bind">DataBindingException</a></code> - If the operation fails, such as due to I/O error, unbindable classes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="marshal-java.lang.Object-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>marshal</h4> |
| <pre>public static void marshal(java.lang.Object jaxbObject, |
| java.lang.String xml)</pre> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>jaxbObject</code> - The Java object to be marshalled into XML. If this object is |
| a <a href="../../../jakarta/xml/bind/JAXBElement.html" title="class in jakarta.xml.bind"><code>JAXBElement</code></a>, it will provide the root tag name and |
| the body. If this object has <a href="../../../jakarta/xml/bind/annotation/XmlRootElement.html" title="annotation in jakarta.xml.bind.annotation"><code>XmlRootElement</code></a> |
| on its class definition, that will be used as the root tag name |
| and the given object will provide the body. Otherwise, |
| the root tag name is <code>infered</code> from |
| <code>the short class name</code>. |
| This parameter must not be null.</dd> |
| <dd><code>xml</code> - The string is first interpreted as an absolute <code>URI</code>. |
| If it's not <code>a valid absolute URI</code>, |
| then it's interpreted as a <code>File</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/DataBindingException.html" title="class in jakarta.xml.bind">DataBindingException</a></code> - If the operation fails, such as due to I/O error, unbindable classes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="marshal-java.lang.Object-java.io.OutputStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>marshal</h4> |
| <pre>public static void marshal(java.lang.Object jaxbObject, |
| java.io.OutputStream xml)</pre> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>jaxbObject</code> - The Java object to be marshalled into XML. If this object is |
| a <a href="../../../jakarta/xml/bind/JAXBElement.html" title="class in jakarta.xml.bind"><code>JAXBElement</code></a>, it will provide the root tag name and |
| the body. If this object has <a href="../../../jakarta/xml/bind/annotation/XmlRootElement.html" title="annotation in jakarta.xml.bind.annotation"><code>XmlRootElement</code></a> |
| on its class definition, that will be used as the root tag name |
| and the given object will provide the body. Otherwise, |
| the root tag name is <code>infered</code> from |
| <code>the short class name</code>. |
| This parameter must not be null.</dd> |
| <dd><code>xml</code> - The XML will be sent to the given <code>OutputStream</code>. |
| Upon a successful completion, the stream will be closed by this method.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/DataBindingException.html" title="class in jakarta.xml.bind">DataBindingException</a></code> - If the operation fails, such as due to I/O error, unbindable classes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="marshal-java.lang.Object-java.io.Writer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>marshal</h4> |
| <pre>public static void marshal(java.lang.Object jaxbObject, |
| java.io.Writer xml)</pre> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>jaxbObject</code> - The Java object to be marshalled into XML. If this object is |
| a <a href="../../../jakarta/xml/bind/JAXBElement.html" title="class in jakarta.xml.bind"><code>JAXBElement</code></a>, it will provide the root tag name and |
| the body. If this object has <a href="../../../jakarta/xml/bind/annotation/XmlRootElement.html" title="annotation in jakarta.xml.bind.annotation"><code>XmlRootElement</code></a> |
| on its class definition, that will be used as the root tag name |
| and the given object will provide the body. Otherwise, |
| the root tag name is <code>infered</code> from |
| <code>the short class name</code>. |
| This parameter must not be null.</dd> |
| <dd><code>xml</code> - The XML will be sent as a character stream to the given <code>Writer</code>. |
| Upon a successful completion, the stream will be closed by this method.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/DataBindingException.html" title="class in jakarta.xml.bind">DataBindingException</a></code> - If the operation fails, such as due to I/O error, unbindable classes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="marshal-java.lang.Object-javax.xml.transform.Result-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>marshal</h4> |
| <pre>public static void marshal(java.lang.Object jaxbObject, |
| javax.xml.transform.Result xml)</pre> |
| <div class="block">Writes a Java object tree to XML and store it to the specified location.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>jaxbObject</code> - The Java object to be marshalled into XML. If this object is |
| a <a href="../../../jakarta/xml/bind/JAXBElement.html" title="class in jakarta.xml.bind"><code>JAXBElement</code></a>, it will provide the root tag name and |
| the body. If this object has <a href="../../../jakarta/xml/bind/annotation/XmlRootElement.html" title="annotation in jakarta.xml.bind.annotation"><code>XmlRootElement</code></a> |
| on its class definition, that will be used as the root tag name |
| and the given object will provide the body. Otherwise, |
| the root tag name is <code>infered</code> from |
| <code>the short class name</code>. |
| This parameter must not be null.</dd> |
| <dd><code>xml</code> - The XML will be sent to the <code>Result</code> object.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../jakarta/xml/bind/DataBindingException.html" title="class in jakarta.xml.bind">DataBindingException</a></code> - If the operation fails, such as due to I/O error, unbindable classes.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../jakarta/xml/bind/Element.html" title="interface in jakarta.xml.bind"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../jakarta/xml/bind/JAXBContext.html" title="class in jakarta.xml.bind"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?jakarta/xml/bind/JAXB.html" target="_top">Frames</a></li> |
| <li><a href="JAXB.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |