public class TypeMarshaller extends Object
Constructor and Description |
---|
TypeMarshaller() |
Modifier and Type | Method and Description |
---|---|
static File |
marshalTypeToFile(Object typeObject,
String filenamePath) |
static void |
marshalTypeToOutputStream(Object typeObject,
OutputStream os) |
static void |
marshalTypeToOutputStream(Object typeObject,
OutputStream os,
String styleSheet)
Marshalls the typeObject to the provided outputStream.
|
static <T> T |
unmarshalTypeFromFile(Class<T> domainClass,
File file)
Unmarshalls the contents of file parameter to the specified domainClass
|
static <T> T |
unmarshalTypeFromFile(Class<T> domainClass,
String filenamePath)
Unmarshalls the contents of the filenamePath into the specified domainClass
|
static <T> T |
unmarshalTypeFromStream(Class<T> domainClass,
InputStream inputStream)
Unmarshalls the inputStream to the specified domainClass
and unequivocally closes the passed in InputStream
|
public static File marshalTypeToFile(Object typeObject, String filenamePath) throws org.jibx.runtime.JiBXException, FileNotFoundException, IOException
org.jibx.runtime.JiBXException
FileNotFoundException
IOException
public static void marshalTypeToOutputStream(Object typeObject, OutputStream os) throws org.jibx.runtime.JiBXException, IOException
org.jibx.runtime.JiBXException
IOException
public static void marshalTypeToOutputStream(Object typeObject, OutputStream os, String styleSheet) throws org.jibx.runtime.JiBXException, IOException
typeObject
- os
- styleSheet
- org.jibx.runtime.JiBXException
IOException
public static <T> T unmarshalTypeFromFile(Class<T> domainClass, String filenamePath) throws IOException, InstantiationException, IllegalAccessException, org.jibx.runtime.JiBXException
T
- domainClass
- filenamePath
- IOException
InstantiationException
IllegalAccessException
org.jibx.runtime.JiBXException
public static <T> T unmarshalTypeFromFile(Class<T> domainClass, File file) throws IOException, InstantiationException, IllegalAccessException, org.jibx.runtime.JiBXException
T
- domainClass
- file
- IOException
InstantiationException
IllegalAccessException
org.jibx.runtime.JiBXException
public static <T> T unmarshalTypeFromStream(Class<T> domainClass, InputStream inputStream) throws IOException, InstantiationException, IllegalAccessException, org.jibx.runtime.JiBXException
T
- domainClass
- inputStream
- IOException
InstantiationException
IllegalAccessException
org.jibx.runtime.JiBXException
Copyright © 2014. All Rights Reserved.