gpt4 book ai didi

com.thoughtworks.xstream.XStreamer.fromXML()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 04:39:05 25 4
gpt4 key购买 nike

本文整理了Java中com.thoughtworks.xstream.XStreamer.fromXML()方法的一些代码示例,展示了XStreamer.fromXML()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XStreamer.fromXML()方法的具体详情如下:
包路径:com.thoughtworks.xstream.XStreamer
类名称:XStreamer
方法名:fromXML

XStreamer.fromXML介绍

[英]Deserialize a self-contained XStream with object from an XML Reader.
[中]使用XML读取器中的对象反序列化自包含的XStream。

代码示例

代码示例来源:origin: com.thoughtworks.xstream/xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader.
 *
 * @param driver the implementation to use
 * @param xml the {@link Reader} providing the XML data
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 */
public Object fromXML(final HierarchicalStreamDriver driver, final Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(driver, xml, PERMISSIONS);
}

代码示例来源:origin: com.thoughtworks.xstream/xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use
 * internally an XppDriver to load the contained XStream instance with default permissions.
 * 
 * @param xml the {@link Reader} providing the XML data
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(final Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml);
}

代码示例来源:origin: com.thoughtworks.xstream/xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use
 * internally an XppDriver to load the contained XStream instance.
 * 
 * @param xml the {@link Reader} providing the XML data
 * @param permissions the permissions to use (ensure that they include the defaults)
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.4.7
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(final Reader xml, final TypePermission[] permissions)
    throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml, permissions);
}

代码示例来源:origin: com.thoughtworks.xstream/xstream

/**
 * Deserialize a self-contained XStream with object from a String. The method will use
 * internally an XppDriver to load the contained XStream instance with default permissions.
 * 
 * @param xml the XML data
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws ObjectStreamException if the XML contains non-deserializable elements
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(final String xml) throws ClassNotFoundException, ObjectStreamException {
  try {
    return fromXML(new StringReader(xml));
  } catch (final ObjectStreamException e) {
    throw e;
  } catch (final IOException e) {
    throw new StreamException("Unexpected IO error from a StringReader", e);
  }
}

代码示例来源:origin: com.thoughtworks.xstream/xstream

/**
 * Deserialize a self-contained XStream with object from a String. The method will use
 * internally an XppDriver to load the contained XStream instance.
 * 
 * @param xml the XML data
 * @param permissions the permissions to use (ensure that they include the defaults)
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws ObjectStreamException if the XML contains non-deserializable elements
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.4.7
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(final String xml, final TypePermission[] permissions) throws ClassNotFoundException, ObjectStreamException {
  try {
    return fromXML(new StringReader(xml), permissions);
  } catch (final ObjectStreamException e) {
    throw e;
  } catch (final IOException e) {
    throw new StreamException("Unexpected IO error from a StringReader", e);
  }
}

代码示例来源:origin: com.thoughtworks.xstream/xstream

/**
 * Deserialize a self-contained XStream with object from a String.
 * 
 * @param driver the implementation to use
 * @param xml the XML data
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws ObjectStreamException if the XML contains non-deserializable elements
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(final HierarchicalStreamDriver driver, final String xml)
    throws ClassNotFoundException, ObjectStreamException {
  try {
    return fromXML(driver, new StringReader(xml));
  } catch (final ObjectStreamException e) {
    throw e;
  } catch (final IOException e) {
    throw new StreamException("Unexpected IO error from a StringReader", e);
  }
}

代码示例来源:origin: com.thoughtworks.xstream/xstream

/**
 * Deserialize a self-contained XStream with object from a String.
 * 
 * @param driver the implementation to use
 * @param xml the XML data
 * @param permissions the permissions to use (ensure that they include the defaults)
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws ObjectStreamException if the XML contains non-deserializable elements
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.4.7
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(final HierarchicalStreamDriver driver, final String xml, final TypePermission[] permissions)
    throws ClassNotFoundException, ObjectStreamException {
  try {
    return fromXML(driver, new StringReader(xml), permissions);
  } catch (final ObjectStreamException e) {
    throw e;
  } catch (final IOException e) {
    throw new StreamException("Unexpected IO error from a StringReader", e);
  }
}

代码示例来源:origin: x-stream/xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader.
 *
 * @param driver the implementation to use
 * @param xml the {@link Reader} providing the XML data
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 */
public <T> T fromXML(final HierarchicalStreamDriver driver, final Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(driver, xml, PERMISSIONS);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8

/**
 * Deserialize a self-contained XStream with object from an XML Reader.
 *
 * @param driver the implementation to use
 * @param xml the {@link Reader} providing the XML data
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 */
public Object fromXML(final HierarchicalStreamDriver driver, final Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(driver, xml, PERMISSIONS);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader.
 *
 * @param driver the implementation to use
 * @param xml the {@link Reader} providing the XML data
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 */
public Object fromXML(final HierarchicalStreamDriver driver, final Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(driver, xml, PERMISSIONS);
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Deserialize a self-contained XStream with object from an XML Reader.
 *
 * @param driver the implementation to use
 * @param xml the {@link Reader} providing the XML data
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 */
public Object fromXML(final HierarchicalStreamDriver driver, final Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(driver, xml, PERMISSIONS);
}

代码示例来源:origin: x-stream/xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use internally an XppDriver
 * to load the contained XStream instance with default permissions.
 *
 * @param xml the {@link Reader} providing the XML data
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 * @see #toXML(XStream, Object, Writer)
 */
public <T> T fromXML(final Reader xml) throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use
 * internally an XppDriver to load the contained XStream instance with default permissions.
 * 
 * @param xml the {@link Reader} providing the XML data
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(final Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml);
}

代码示例来源:origin: org.jvnet.hudson/xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use
 * internally an XppDriver to load the contained XStream instance.
 * 
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml);
}

代码示例来源:origin: com.haulmont.thirdparty/xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use
 * internally an XppDriver to load the contained XStream instance.
 * 
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml);
}

代码示例来源:origin: org.sonatype.nexus.xstream/xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use
 * internally an XppDriver to load the contained XStream instance.
 * 
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml);
}

代码示例来源:origin: ovea-deprecated/jetty-session-redis

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use
 * internally an XppDriver to load the contained XStream instance.
 * 
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use
 * internally an XppDriver to load the contained XStream instance with default permissions.
 * 
 * @param xml the {@link Reader} providing the XML data
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.2
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(final Reader xml)
    throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml);
}

代码示例来源:origin: x-stream/xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use internally an XppDriver
 * to load the contained XStream instance.
 *
 * @param xml the {@link Reader} providing the XML data
 * @param permissions the permissions to use (ensure that they include the defaults)
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.4.7
 * @see #toXML(XStream, Object, Writer)
 */
public <T> T fromXML(final Reader xml, final TypePermission... permissions)
    throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml, permissions);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream

/**
 * Deserialize a self-contained XStream with object from an XML Reader. The method will use
 * internally an XppDriver to load the contained XStream instance.
 * 
 * @param xml the {@link Reader} providing the XML data
 * @param permissions the permissions to use (ensure that they include the defaults)
 * @throws IOException if an error occurs reading from the Reader.
 * @throws ClassNotFoundException if a class in the XML stream cannot be found
 * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized
 * @since 1.4.7
 * @see #toXML(XStream, Object, Writer)
 */
public Object fromXML(final Reader xml, final TypePermission[] permissions)
    throws IOException, ClassNotFoundException {
  return fromXML(new XppDriver(), xml, permissions);
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com