DataBindingException.<init>
Code IndexAdd Codota to your IDE (free)

Best code snippets using javax.xml.bind.DataBindingException.<init>(Showing top 15 results out of 315)

  • Common ways to obtain DataBindingException
private void myMethod () {
DataBindingException d =
  • Throwable cause;new DataBindingException(cause)
  • Smart code suggestions by Codota
}
origin: javax.xml.bind/jaxb-api

/**
 * Reads in a Java object tree from the given XML input.
 *
 * @param xml
 *      Reads the entire file as XML.
 */
public static <T> T unmarshal( File xml, Class<T> type ) {
  try {
    JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(new StreamSource(xml), type);
    return item.getValue();
  } catch (JAXBException e) {
    throw new DataBindingException(e);
  }
}
origin: javax.xml.bind/jaxb-api

  m.marshal(jaxbObject, toResult(xml));
} catch (JAXBException e) {
  throw new DataBindingException(e);
} catch (IOException e) {
  throw new DataBindingException(e);
origin: javax.xml.bind/jaxb-api

/**
 * Reads in a Java object tree from the given XML input.
 *
 * @param xml
 *      The resource pointed by the URL is read in its entirety.
 */
public static <T> T unmarshal( URL xml, Class<T> type ) {
  try {
    JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
    return item.getValue();
  } catch (JAXBException e) {
    throw new DataBindingException(e);
  } catch (IOException e) {
    throw new DataBindingException(e);
  }
}
origin: org.apache.geronimo.specs/geronimo-jaxb_2.1_spec

public static void marshal(Object object, URI uri) {
  if (uri == null) {
    throw new IllegalStateException("No uri is given");
  }
  try {
    marshal(object, uri.toURL());
  } catch (IOException e) {
    throw new DataBindingException(e);
  }
}
origin: org.apache.geronimo.specs/geronimo-jaxb_2.2_spec

public static <T> T unmarshal(URI uri, Class<T> type) {
  if (uri == null) {
    throw new IllegalStateException("No uri is given");
  }
  try {
    return unmarshal(uri.toURL(), type);
  } catch (MalformedURLException e) {
    throw new DataBindingException(e);
  }
}
origin: org.apache.openejb/javaee-api

public static <T> T unmarshal(Source source, Class<T> type) {
  try {
    JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(source, type);
    return item.getValue();
  } catch (JAXBException e) {
    throw new DataBindingException(e);
  }
}
origin: javax.xml.bind/jaxb-api

/**
 * Reads in a Java object tree from the given XML input.
 *
 * @param xml
 *      The XML infoset that the {@link Source} represents is read.
 */
public static <T> T unmarshal( Source xml, Class<T> type ) {
  try {
    JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
    return item.getValue();
  } catch (JAXBException e) {
    throw new DataBindingException(e);
  } catch (IOException e) {
    throw new DataBindingException(e);
  }
}
origin: javax.xml.bind/jaxb-api

/**
 * Reads in a Java object tree from the given XML input.
 *
 * @param xml
 *      The URI is {@link URI#toURL() turned into URL} and then
 *      follows the handling of {@code URL}.
 */
public static <T> T unmarshal( URI xml, Class<T> type ) {
  try {
    JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
    return item.getValue();
  } catch (JAXBException e) {
    throw new DataBindingException(e);
  } catch (IOException e) {
    throw new DataBindingException(e);
  }
}
origin: javax.xml.bind/jaxb-api

/**
 * Reads in a Java object tree from the given XML input.
 *
 * @param xml
 *      The entire stream is read as an XML infoset.
 *      Upon a successful completion, the stream will be closed by this method.
 */
public static <T> T unmarshal( InputStream xml, Class<T> type ) {
  try {
    JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
    return item.getValue();
  } catch (JAXBException e) {
    throw new DataBindingException(e);
  } catch (IOException e) {
    throw new DataBindingException(e);
  }
}
origin: javax.xml.bind/jaxb-api

/**
 * Reads in a Java object tree from the given XML input.
 *
 * @param xml
 *      The string is first interpreted as an absolute {@code URI}.
 *      If it's not {@link URI#isAbsolute() a valid absolute URI},
 *      then it's interpreted as a {@code File}
 */
public static <T> T unmarshal( String xml, Class<T> type ) {
  try {
    JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
    return item.getValue();
  } catch (JAXBException e) {
    throw new DataBindingException(e);
  } catch (IOException e) {
    throw new DataBindingException(e);
  }
}
origin: javax.xml.bind/jaxb-api

/**
 * Reads in a Java object tree from the given XML input.
 *
 * @param xml
 *      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.
 */
public static <T> T unmarshal( Reader xml, Class<T> type ) {
  try {
    JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
    return item.getValue();
  } catch (JAXBException e) {
    throw new DataBindingException(e);
  } catch (IOException e) {
    throw new DataBindingException(e);
  }
}
origin: org.apache.geronimo.specs/geronimo-jaxb_2.1_spec

public static <T> T unmarshal(URI uri, Class<T> type) {
  if (uri == null) {
    throw new IllegalStateException("No uri is given");
  }
  try {
    return unmarshal(uri.toURL(), type);
  } catch (MalformedURLException e) {
    throw new DataBindingException(e);
  }
}
origin: org.apache.geronimo.specs/geronimo-jaxb_2.1_spec

public static <T> T unmarshal(Source source, Class<T> type) {
  try {
    JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(source, type);
    return item.getValue();
  } catch (JAXBException e) {
    throw new DataBindingException(e);
  }
}
origin: org.apache.geronimo.specs/geronimo-jaxb_2.2_spec

public static void marshal(Object object, URI uri) {
  if (uri == null) {
    throw new IllegalStateException("No uri is given");
  }
  try {
    marshal(object, uri.toURL());
  } catch (IOException e) {
    throw new DataBindingException(e);
  }
}
origin: org.apache.openejb/javaee-api

public static <T> T unmarshal(URI uri, Class<T> type) {
  if (uri == null) {
    throw new IllegalStateException("No uri is given");
  }
  try {
    return unmarshal(uri.toURL(), type);
  } catch (MalformedURLException e) {
    throw new DataBindingException(e);
  }
}
javax.xml.bindDataBindingException<init>

Popular methods of DataBindingException

    Popular classes and methods

    • setScale (BigDecimal)
      Returns a new BigDecimal instance with the specified scale. If the new scale is greater than the old
    • runOnUiThread (Activity)
    • getResourceAsStream (ClassLoader)
      Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
    • BigInteger (java.math)
      An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
    • MessageFormat (java.text)
      Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
    • SimpleDateFormat (java.text)
      Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
    • ArrayList (java.util)
      Resizable-array implementation of the List interface.
    • Collectors (java.util.stream)
    • Annotation (javassist.bytecode.annotation)
      The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
    • JList (javax.swing)

    For IntelliJ IDEA,
    Android Studio or Eclipse

    • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
    • EnterpriseFAQAboutContact Us
    • Terms of usePrivacy policyCodeboxFind Usages
    Add Codota to your IDE (free)