Refine search
private Object unmarshal( String url ) throws JAXBException { return unmarshal( new InputSource(url) ); }
public final Object unmarshal( InputSource source ) throws JAXBException { if( source == null ) { throw new IllegalArgumentException( Messages.format( Messages.MUST_NOT_BE_NULL, "source" ) ); } return unmarshal( getXMLReader(), source ); }
public void setAdapter(XmlAdapter adapter) { if(adapter==null) throw new IllegalArgumentException(); setAdapter((Class)adapter.getClass(),adapter); }
public Object unmarshal( Source source ) throws JAXBException { if( source == null ) { throw new IllegalArgumentException( Messages.format( Messages.MUST_NOT_BE_NULL, "source" ) ); } if(source instanceof SAXSource) return unmarshal( (SAXSource)source ); if(source instanceof StreamSource) return unmarshal( streamSourceToInputSource((StreamSource)source)); if(source instanceof DOMSource) return unmarshal( ((DOMSource)source).getNode() ); // we don't handle other types of Source throw new IllegalArgumentException(); }
public final java.lang.Object unmarshal(java.net.URL pURL) throws JAXBException { InputSource isource; try { isource = new InputSource(pURL.openStream()); } catch (IOException e) { throw new JAXBException("Failed to open URL " + pURL + ": " + e.getMessage(), e); } isource.setSystemId(pURL.toExternalForm()); return unmarshal(getXMLReader(), isource); }
public final java.lang.Object unmarshal(java.io.InputStream pSource) throws JAXBException { return unmarshal(getXMLReader(), new InputSource(pSource)); }
@Deprecated public final Object unmarshal( SAXSource source ) throws JAXBException { return super.unmarshal(source); }
@Override public UnmarshalException createUnmarshalException( SAXException e ) { return super.createUnmarshalException(e); }
@Override public final ValidationEventHandler getEventHandler() { try { return super.getEventHandler(); } catch (JAXBException e) { // impossible throw new AssertionError(); } }
@Override public Object getProperty(String name) throws PropertyException { if(name.equals(IDResolver.class.getName())) { return idResolver; } return super.getProperty(name); }
public final java.lang.Object unmarshal(java.net.URL pURL) throws JAXBException { InputSource isource; try { isource = new InputSource(pURL.openStream()); } catch (IOException e) { throw new JAXBException("Failed to open URL " + pURL + ": " + e.getMessage(), e); } isource.setSystemId(pURL.toExternalForm()); return unmarshal(getXMLReader(), isource); }
public final java.lang.Object unmarshal(java.io.InputStream pSource) throws JAXBException { return unmarshal(getXMLReader(), new InputSource(pSource)); }
public Object unmarshal( Source source ) throws JAXBException { if( source == null ) { throw new IllegalArgumentException( Messages.format( Messages.MUST_NOT_BE_NULL, "source" ) ); } if(source instanceof SAXSource) return unmarshal( (SAXSource)source ); if(source instanceof StreamSource) return unmarshal( streamSourceToInputSource((StreamSource)source)); if(source instanceof DOMSource) return unmarshal( ((DOMSource)source).getNode() ); // we don't handle other types of Source throw new IllegalArgumentException(); }
public final Object unmarshal( File f ) throws JAXBException { if( f == null ) { throw new IllegalArgumentException( Messages.format( Messages.MUST_NOT_BE_NULL, "file" ) ); } try { return unmarshal(new BufferedInputStream(new FileInputStream(f))); } catch( FileNotFoundException e ) { throw new IllegalArgumentException(e.getMessage()); } }
@Override public UnmarshalException createUnmarshalException( SAXException e ) { return super.createUnmarshalException(e); }
@Override public final ValidationEventHandler getEventHandler() { try { return super.getEventHandler(); } catch (JAXBException e) { // impossible throw new AssertionError(); } }
@Override public Object getProperty(String name) throws PropertyException { if(name.equals(IDResolver.class.getName())) { return idResolver; } return super.getProperty(name); }
public final Object unmarshal( java.io.InputStream is ) throws JAXBException { if( is == null ) { throw new IllegalArgumentException( Messages.format( Messages.MUST_NOT_BE_NULL, "is" ) ); } InputSource isrc = new InputSource( is ); return unmarshal( isrc ); }
private Object unmarshal( SAXSource source ) throws JAXBException { XMLReader r = source.getXMLReader(); if( r == null ) r = getXMLReader(); return unmarshal( r, source.getInputSource() ); }
public Object unmarshal( Source source ) throws JAXBException { if( source == null ) { throw new IllegalArgumentException( Messages.format( Messages.MUST_NOT_BE_NULL, "source" ) ); } if(source instanceof SAXSource) return unmarshal( (SAXSource)source ); if(source instanceof StreamSource) return unmarshal( streamSourceToInputSource((StreamSource)source)); if(source instanceof DOMSource) return unmarshal( ((DOMSource)source).getNode() ); // we don't handle other types of Source throw new IllegalArgumentException(); }