org.gedcomx.rt
Class SerializationUtil

java.lang.Object
  extended by org.gedcomx.rt.SerializationUtil

public class SerializationUtil
extends Object

Author:
Ryan Heaton

Constructor Summary
SerializationUtil()
           
 
Method Summary
static
<C> C
processThroughJson(Object reference, Class<? extends C> instanceClass, org.codehaus.jackson.map.ObjectMapper mapper, SerializationProcessListener... listeners)
           
static
<C> C
processThroughJson(Object reference, Class<? extends C> instanceClass, SerializationProcessListener... listeners)
           
static
<C> C
processThroughJson(Object reference, SerializationProcessListener... listeners)
           
static
<C> C
processThroughXml(Object reference, Class<? extends C> instanceClass, JAXBContext context, SerializationProcessListener... listeners)
           
static
<C> C
processThroughXml(Object reference, Class<? extends C> instanceClass, SerializationProcessListener... listeners)
           
static
<C> C
processThroughXml(Object reference, SerializationProcessListener... listeners)
           
static org.codehaus.jackson.node.ObjectNode toJsonNode(Object reference)
           
static org.codehaus.jackson.node.ObjectNode toJsonNode(Object reference, Class<?> instanceClass)
           
static org.codehaus.jackson.node.ObjectNode toJsonNode(Object reference, Class<?> instanceClass, org.codehaus.jackson.map.ObjectMapper mapper)
           
protected static
<C> byte[]
toJsonStream(Object reference, Class<? extends C> instanceClass, org.codehaus.jackson.map.ObjectMapper mapper, SerializationProcessListener... listeners)
           
static
<C> byte[]
toJsonStream(Object reference, Class<? extends C> instanceClass, SerializationProcessListener... listeners)
           
static
<C> byte[]
toJsonStream(Object reference, SerializationProcessListener... listeners)
           
static Document toXmlDom(Object reference)
           
static Document toXmlDom(Object reference, Class<?> instanceClass)
           
static Document toXmlDom(Object reference, Class<?> instanceClass, JAXBContext context)
           
static
<C> byte[]
toXmlStream(Object reference, Class<? extends C> instanceClass, JAXBContext context, SerializationProcessListener... listeners)
           
static
<C> byte[]
toXmlStream(Object reference, Class<? extends C> instanceClass, SerializationProcessListener... listeners)
           
static byte[] toXmlStream(Object reference, SerializationProcessListener... listeners)
           
static
<C> void
writeJson(Object reference, Class<? extends C> instanceClass, org.codehaus.jackson.map.ObjectMapper mapper, OutputStream out)
           
static
<C> void
writeJson(Object reference, Class<? extends C> instanceClass, OutputStream out)
           
static
<C> void
writeJson(Object reference, OutputStream out)
           
static
<C> void
writeXml(Object reference, Class<? extends C> instanceClass, JAXBContext context, OutputStream out)
           
static
<C> void
writeXml(Object reference, Class<? extends C> instanceClass, OutputStream out)
           
static void writeXml(Object reference, OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializationUtil

public SerializationUtil()
Method Detail

processThroughXml

public static <C> C processThroughXml(Object reference,
                                      SerializationProcessListener... listeners)
                           throws JAXBException,
                                  UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

processThroughXml

public static <C> C processThroughXml(Object reference,
                                      Class<? extends C> instanceClass,
                                      SerializationProcessListener... listeners)
                           throws JAXBException,
                                  UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

processThroughXml

public static <C> C processThroughXml(Object reference,
                                      Class<? extends C> instanceClass,
                                      JAXBContext context,
                                      SerializationProcessListener... listeners)
                           throws JAXBException,
                                  UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

toXmlStream

public static byte[] toXmlStream(Object reference,
                                 SerializationProcessListener... listeners)
                          throws JAXBException,
                                 UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

writeXml

public static void writeXml(Object reference,
                            OutputStream out)
                     throws JAXBException,
                            UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

toXmlStream

public static <C> byte[] toXmlStream(Object reference,
                                     Class<? extends C> instanceClass,
                                     SerializationProcessListener... listeners)
                          throws JAXBException,
                                 UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

writeXml

public static <C> void writeXml(Object reference,
                                Class<? extends C> instanceClass,
                                OutputStream out)
                     throws JAXBException,
                            UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

toXmlStream

public static <C> byte[] toXmlStream(Object reference,
                                     Class<? extends C> instanceClass,
                                     JAXBContext context,
                                     SerializationProcessListener... listeners)
                          throws JAXBException,
                                 UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

writeXml

public static <C> void writeXml(Object reference,
                                Class<? extends C> instanceClass,
                                JAXBContext context,
                                OutputStream out)
                     throws JAXBException,
                            UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

toXmlDom

public static Document toXmlDom(Object reference)
                         throws JAXBException,
                                UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

toXmlDom

public static Document toXmlDom(Object reference,
                                Class<?> instanceClass)
                         throws JAXBException,
                                UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

toXmlDom

public static Document toXmlDom(Object reference,
                                Class<?> instanceClass,
                                JAXBContext context)
                         throws JAXBException,
                                UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

processThroughJson

public static <C> C processThroughJson(Object reference,
                                       SerializationProcessListener... listeners)
                            throws IOException
Throws:
IOException

processThroughJson

public static <C> C processThroughJson(Object reference,
                                       Class<? extends C> instanceClass,
                                       SerializationProcessListener... listeners)
                            throws IOException
Throws:
IOException

processThroughJson

public static <C> C processThroughJson(Object reference,
                                       Class<? extends C> instanceClass,
                                       org.codehaus.jackson.map.ObjectMapper mapper,
                                       SerializationProcessListener... listeners)
                            throws IOException
Throws:
IOException

toJsonStream

public static <C> byte[] toJsonStream(Object reference,
                                      SerializationProcessListener... listeners)
                           throws IOException
Throws:
IOException

writeJson

public static <C> void writeJson(Object reference,
                                 OutputStream out)
                      throws IOException
Throws:
IOException

toJsonStream

public static <C> byte[] toJsonStream(Object reference,
                                      Class<? extends C> instanceClass,
                                      SerializationProcessListener... listeners)
                           throws IOException
Throws:
IOException

writeJson

public static <C> void writeJson(Object reference,
                                 Class<? extends C> instanceClass,
                                 OutputStream out)
                      throws IOException
Throws:
IOException

toJsonStream

protected static <C> byte[] toJsonStream(Object reference,
                                         Class<? extends C> instanceClass,
                                         org.codehaus.jackson.map.ObjectMapper mapper,
                                         SerializationProcessListener... listeners)
                              throws IOException
Throws:
IOException

writeJson

public static <C> void writeJson(Object reference,
                                 Class<? extends C> instanceClass,
                                 org.codehaus.jackson.map.ObjectMapper mapper,
                                 OutputStream out)
                      throws IOException
Throws:
IOException

toJsonNode

public static org.codehaus.jackson.node.ObjectNode toJsonNode(Object reference)
                                                       throws IOException
Throws:
IOException

toJsonNode

public static org.codehaus.jackson.node.ObjectNode toJsonNode(Object reference,
                                                              Class<?> instanceClass)
                                                       throws IOException
Throws:
IOException

toJsonNode

public static org.codehaus.jackson.node.ObjectNode toJsonNode(Object reference,
                                                              Class<?> instanceClass,
                                                              org.codehaus.jackson.map.ObjectMapper mapper)
                                                       throws IOException
Throws:
IOException


Copyright © 2016. All rights reserved.