|
SMILA (incubation) API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.smila.datamodel.xml.XmlSerializationUtils
public final class XmlSerializationUtils
The Class XmlSerializationUtils.
Method Summary | |
---|---|
static Record |
deserialize(byte[] byteArray)
De-serialize a serialized record (byte[]) to a record. |
static Record |
deserialize(org.w3c.dom.Document document)
Deserialize a record from a Document. |
static Record |
deserialize(java.lang.String xmlString)
Deserialize a record from an xmlString. |
static Record |
deserializeNoAttachments(java.io.InputStream recordInputStream)
|
static DOMRecordReader |
getRecordParser()
Get the RecordParser. |
static StaxRecordReader |
getRecordReader()
Get the RecordReader. |
static StaxRecordWriter |
getRecordWriter()
Get the RecordWriter. |
static javax.xml.stream.XMLInputFactory |
getStaxReaderFactory()
Get the XMLInputFactory. |
static javax.xml.stream.XMLOutputFactory |
getStaxWriterFactory()
Get the XMLOutputFactory. |
static byte[] |
serialize2byteArray(Record record)
Serializes a Record into a byte[]. |
static java.io.ByteArrayOutputStream |
serialize2stream(Record record)
Serializes a Record in UTF-8 into a ByteArrayOutputStream. |
static void |
serialize2stream(Record record,
java.io.OutputStream out)
Serializes a Record into the given stream in UTF-8. |
static java.lang.String |
serialize2string(Record record)
Serializes a Record into a String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String serialize2string(Record record)
record
- the record
public static byte[] serialize2byteArray(Record record)
record
- the record
public static java.io.ByteArrayOutputStream serialize2stream(Record record)
record
- the record
public static void serialize2stream(Record record, java.io.OutputStream out)
record
- the recordout
- needs to be closed by the callerpublic static Record deserialize(byte[] byteArray) throws DeserializationException
byteArray
- the byte array
DeserializationException
- the datamodel deserialization exceptionpublic static Record deserializeNoAttachments(java.io.InputStream recordInputStream) throws javax.xml.stream.XMLStreamException
recordInputStream
-
javax.xml.stream.XMLStreamException
public static Record deserialize(java.lang.String xmlString) throws DeserializationException
xmlString
- the xml string
DeserializationException
- the datamodel deserialization exceptionpublic static Record deserialize(org.w3c.dom.Document document) throws DeserializationException
document
- the document
DeserializationException
- the datamodel deserialization exceptionpublic static DOMRecordReader getRecordParser()
public static javax.xml.stream.XMLOutputFactory getStaxWriterFactory()
public static javax.xml.stream.XMLInputFactory getStaxReaderFactory()
public static StaxRecordWriter getRecordWriter()
public static StaxRecordReader getRecordReader()
|
SMILA (incubation) API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |