程序包 weka.core.xml
类 XStream
java.lang.Object
weka.core.xml.XStream
- 所有已实现的接口:
RevisionHandler
This class is a helper class for XML serialization using
XStream .
XStream does not need to be present, since the class-calls are done generically via Reflection.
- 版本:
- $Revision: 5562 $
- 作者:
- Mark Hall (mhall{[at]}pentaho{[dot]}org)
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Object
deSerialize
(String xmlString) Deserializes an object from the supplied XML stringReturns the revision string.static boolean
returns whether XStream is present or not, i.e.static Object
reads the XML-serialized object from the given filestatic Object
read
(InputStream stream) reads the XML-serialized object from the given input streamstatic Object
reads the XML-serialized object from the given Readerstatic Object
reads the XML-serialized object from the given filestatic String
Serializes the supplied object xmlstatic boolean
write the XML-serialized object to the given filestatic boolean
write
(OutputStream stream, Object o) writes the XML-serialized object to the given output streamstatic boolean
writes the XML-serialized object to the given Writerstatic boolean
writes the XML-serialized object to the given file
-
字段详细资料
-
FILE_EXTENSION
the extension for XStream files (including '.')- 另请参阅:
-
-
构造器详细资料
-
XStream
public XStream()
-
-
方法详细资料
-
isPresent
public static boolean isPresent()returns whether XStream is present or not, i.e. whether the classes are in the classpath or not- 返回:
- whether XStream is available
-
serialize
Serializes the supplied object xml- 参数:
toSerialize
- the object to serialize- 返回:
- the serialized object as an XML string
- 抛出:
Exception
- if something goes wrong
-
write
writes the XML-serialized object to the given file- 参数:
filename
- the file to serialize the object too
- the object to write to the file- 返回:
- whether writing was successful or not
- 抛出:
Exception
- if something goes wrong while writing to the file
-
write
write the XML-serialized object to the given file- 参数:
file
- the file to serialize the object too
- the object to write to the file- 返回:
- whether writing was successful or not
- 抛出:
Exception
- if something goes wrong while writing to the file
-
write
writes the XML-serialized object to the given output stream- 参数:
stream
- the output streamo
- the object to write- 返回:
- true if everything goes ok
- 抛出:
Exception
-
write
writes the XML-serialized object to the given Writer- 参数:
writer
- the Writero
- the object to write- 返回:
- true if everything goes ok
- 抛出:
Exception
-
read
reads the XML-serialized object from the given file- 参数:
filename
- the file to deserialize the object from- 返回:
- the deserialized object
- 抛出:
Exception
- if something goes wrong while reading from the file
-
read
reads the XML-serialized object from the given file- 参数:
file
- the file to deserialize the object from- 返回:
- the deserialized object
- 抛出:
Exception
- if something goes wrong while reading from the file
-
read
reads the XML-serialized object from the given input stream- 参数:
stream
- the input stream- 返回:
- the deserialized object
- 抛出:
Exception
- if something goes wrong while reading from stream
-
read
reads the XML-serialized object from the given Reader- 参数:
r
- the reader- 返回:
- the deserialized object
- 抛出:
Exception
- if something goes wrong while reading from stream
-
deSerialize
Deserializes an object from the supplied XML string- 参数:
xmlString
- the XML to deserialize from- 返回:
- the deserialized object
- 抛出:
Exception
- if something goes wrong
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-