|
JAXB v0.21 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--javax.xml.bind.Marshaller
A marshaller governs the process of marshalling a valid content tree into an XML document. It encapsulates the writer used during a marshalling operation, and provides the basic marshalling method.
The process of marshalling a content tree begins when one of the
marshal methods of the
tree's root element object is invoked. This method creates a new
unmarshaller from the given writer and invokes its marshal(MarshallableObject) method, passing the root object, and then
flushes the writer.
The marshalling process does not validate the content tree being
marshalled, but it does require the tree to be valid. If an invalid object
is detected during marshalling then a ValidationRequiredException
will be thrown and the marshalling operation aborted. This may cause an
incomplete XML document to be written; to avoid that, ensure that the
content tree is valid before invoking a marshal method.
MarshallableObject,
MarshallableRootElement,
XMLWriter| Method Summary | |
void |
marshal(MarshallableObject mob)
Marshals the given marshallable object using this marshaller's writer. |
XMLWriter |
writer()
Returns the writer to be used during this marshalling operation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void marshal(MarshallableObject mob)
throws IOException
This method invokes the given object's marshal(Marshaller) method,
passing this marshaller.
IOException - If an I/O error occursValidationRequiredException - If the given object requires validationpublic XMLWriter writer()
|
JAXB v0.21 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Copyright © 2001 by Sun Microsystems, Inc., 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.