| Method from javax.xml.bind.helpers.AbstractMarshallerImpl Detail: |
public A getAdapter(Class type) {
throw new UnsupportedOperationException();
}
|
public AttachmentMarshaller getAttachmentMarshaller() {
throw new UnsupportedOperationException();
}
|
protected String getEncoding() {
return encoding;
}
Convenience method for getting the current output encoding. |
public ValidationEventHandler getEventHandler() throws JAXBException {
return eventHandler;
}
|
protected String getJavaEncoding(String encoding) throws UnsupportedEncodingException {
try {
"1".getBytes(encoding);
return encoding;
} catch( UnsupportedEncodingException e ) {
// try known alias
for( int i=0; i< aliases.length; i+=2 ) {
if(encoding.equals(aliases[i])) {
"1".getBytes(aliases[i+1]);
return aliases[i+1];
}
}
throw new UnsupportedEncodingException(encoding);
}
/* J2SE1.4 feature
try {
this.encoding = Charset.forName( _encoding );
} catch( UnsupportedCharsetException uce ) {
throw new JAXBException( uce );
}
*/
}
Gets the corresponding Java encoding name from an IANA name.
This method is a helper method for the derived class to convert
encoding names. |
public Listener getListener() {
throw new UnsupportedOperationException();
}
|
protected String getNoNSSchemaLocation() {
return noNSSchemaLocation;
}
Convenience method for getting the current noNamespaceSchemaLocation. |
public Node getNode(Object obj) throws JAXBException {
checkNotNull( obj, "obj", Boolean.TRUE, "foo" );
throw new UnsupportedOperationException();
}
|
public Object getProperty(String name) throws PropertyException {
if( name == null ) {
throw new IllegalArgumentException(
Messages.format( Messages.MUST_NOT_BE_NULL, "name" ) );
}
// recognize and handle four pre-defined properties.
if( JAXB_ENCODING.equals(name) )
return getEncoding();
if( JAXB_FORMATTED_OUTPUT.equals(name) )
return isFormattedOutput()?Boolean.TRUE:Boolean.FALSE;
if( JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(name) )
return getNoNSSchemaLocation();
if( JAXB_SCHEMA_LOCATION.equals(name) )
return getSchemaLocation();
if( JAXB_FRAGMENT.equals(name) )
return isFragment()?Boolean.TRUE:Boolean.FALSE;
throw new PropertyException(name);
}
Default implementation of the getProperty method handles
the four defined properties in Marshaller. If a provider
needs to support additional provider specific properties,
it should override this method in a derived class. |
public Schema getSchema() {
throw new UnsupportedOperationException();
}
|
protected String getSchemaLocation() {
return schemaLocation;
}
Convenience method for getting the current schemaLocation. |
protected boolean isFormattedOutput() {
return formattedOutput;
}
Convenience method for getting the formatted output flag. |
protected boolean isFragment() {
return fragment;
}
Convenience method for getting the fragment flag. |
public final void marshal(Object obj,
OutputStream os) throws JAXBException {
checkNotNull( obj, "obj", os, "os" );
marshal( obj, new StreamResult(os) );
}
|
public final void marshal(Object obj,
Writer w) throws JAXBException {
checkNotNull( obj, "obj", w, "writer" );
marshal( obj, new StreamResult(w) );
}
|
public final void marshal(Object obj,
ContentHandler handler) throws JAXBException {
checkNotNull( obj, "obj", handler, "handler" );
marshal( obj, new SAXResult(handler) );
}
|
public final void marshal(Object obj,
Node node) throws JAXBException {
checkNotNull( obj, "obj", node, "node" );
marshal( obj, new DOMResult(node) );
}
|
public void marshal(Object obj,
XMLEventWriter writer) throws JAXBException {
throw new UnsupportedOperationException();
}
|
public void marshal(Object obj,
XMLStreamWriter writer) throws JAXBException {
throw new UnsupportedOperationException();
}
|
public void setAdapter(XmlAdapter adapter) {
if(adapter==null)
throw new IllegalArgumentException();
setAdapter((Class)adapter.getClass(),adapter);
}
|
public void setAdapter(Class type,
A adapter) {
throw new UnsupportedOperationException();
}
|
public void setAttachmentMarshaller(AttachmentMarshaller am) {
throw new UnsupportedOperationException();
}
|
protected void setEncoding(String encoding) {
this.encoding = encoding;
}
Convenience method for setting the output encoding. |
public void setEventHandler(ValidationEventHandler handler) throws JAXBException {
if( handler == null ) {
eventHandler = new DefaultValidationEventHandler();
} else {
eventHandler = handler;
}
}
|
protected void setFormattedOutput(boolean v) {
formattedOutput = v;
}
Convenience method for setting the formatted output flag. |
protected void setFragment(boolean v) {
fragment = v;
}
Convenience method for setting the fragment flag. |
public void setListener(Listener listener) {
throw new UnsupportedOperationException();
}
|
protected void setNoNSSchemaLocation(String location) {
noNSSchemaLocation = location;
}
Convenience method for setting the noNamespaceSchemaLocation. |
public void setProperty(String name,
Object value) throws PropertyException {
if( name == null ) {
throw new IllegalArgumentException(
Messages.format( Messages.MUST_NOT_BE_NULL, "name" ) );
}
// recognize and handle four pre-defined properties.
if( JAXB_ENCODING.equals(name) ) {
checkString( name, value );
setEncoding( (String)value );
return;
}
if( JAXB_FORMATTED_OUTPUT.equals(name) ) {
checkBoolean( name, value );
setFormattedOutput((Boolean) value );
return;
}
if( JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(name) ) {
checkString( name, value );
setNoNSSchemaLocation( (String)value );
return;
}
if( JAXB_SCHEMA_LOCATION.equals(name) ) {
checkString( name, value );
setSchemaLocation( (String)value );
return;
}
if( JAXB_FRAGMENT.equals(name) ) {
checkBoolean(name, value);
setFragment((Boolean) value );
return;
}
throw new PropertyException(name, value);
}
Default implementation of the setProperty method handles
the four defined properties in Marshaller. If a provider
needs to handle additional properties, it should override
this method in a derived class. |
public void setSchema(Schema schema) {
throw new UnsupportedOperationException();
}
|
protected void setSchemaLocation(String location) {
schemaLocation = location;
}
Convenience method for setting the schemaLocation. |