Class JavaWriter


  • public class JavaWriter
    extends java.lang.Object
    Java specific reader that supports collection classes and arrays.
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaWriter()
      Create a new reader.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static IObjectWriterHandler getObjectHandler()
      Get the default Java reader.
      static java.util.Set<TypeInfo> getTypeInfos()
      Get the java type infos.
      static java.util.Set joinTypeInfos​(java.util.Set typeinfos)
      Join sets of typeinfos.
      static byte[] objectToByteArray​(java.lang.Object val, java.lang.ClassLoader classloader)
      Convert to a byte array.
      static byte[] objectToByteArray​(java.lang.Object val, java.lang.ClassLoader classloader, IObjectWriterHandler handler)
      Convert to a byte array.
      static byte[] objectToByteArray​(java.lang.Object val, java.lang.String encoding, java.lang.ClassLoader classloader, IObjectWriterHandler handler)
      Convert to a byte array.
      static void objectToOutputStream​(java.lang.Object val, java.io.OutputStream os, java.lang.ClassLoader classloader)
      Write to output stream.
      static void objectToOutputStream​(java.lang.Object val, java.io.OutputStream os, java.lang.ClassLoader classloader, IObjectWriterHandler handler)
      Write to output stream.
      static java.lang.String objectToXML​(java.lang.Object val, java.lang.ClassLoader classloader)
      Convert to a string.
      static java.lang.String objectToXML​(java.lang.Object val, java.lang.ClassLoader classloader, IObjectWriterHandler handler)
      Convert to a string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • writer

        protected static volatile AWriter writer
        The static writer instance.
    • Constructor Detail

      • JavaWriter

        public JavaWriter()
        Create a new reader.
    • Method Detail

      • joinTypeInfos

        public static java.util.Set joinTypeInfos​(java.util.Set typeinfos)
        Join sets of typeinfos.
        Parameters:
        typeinfos - The user specific type infos.
        Returns:
        The joined type infos.
      • getTypeInfos

        public static java.util.Set<TypeInfo> getTypeInfos()
        Get the java type infos. Supported types: - java.util.Map - jadex.commons.collection.MultiCollection - java.util.List - java.util.Set - Array - java.util.Color - java.util.Date - java.util.Calendar - java.util.Currency - java.lang.Class - java.net.URL - java.logging.Level - java.logging.LogRecord - java.net.InetAddress - java.awt.image.RenderedImage - java.lang.String - java.lang.Boolean - java.lang.Integer - java.lang.Double - java.lang.Float - java.lang.Long - java.lang.Short - java.lang.Byte - java.lang.Character - java.lang.enum - boolean/Boolean Array - int/Integer Array - double/Double Array - float/Float array - long/Long array - short/Short Array - byte/Byte Array - java.lang.Character - jadex.commons.Tuple - jadex.commons.Tuple2 - jadex.commons.Tuple3 - java.util.UUID - java.lang.Throwable
      • objectToXML

        public static java.lang.String objectToXML​(java.lang.Object val,
                                                   java.lang.ClassLoader classloader)
        Convert to a string.
      • objectToByteArray

        public static byte[] objectToByteArray​(java.lang.Object val,
                                               java.lang.ClassLoader classloader)
        Convert to a byte array.
      • objectToOutputStream

        public static void objectToOutputStream​(java.lang.Object val,
                                                java.io.OutputStream os,
                                                java.lang.ClassLoader classloader)
        Write to output stream.
      • objectToXML

        public static java.lang.String objectToXML​(java.lang.Object val,
                                                   java.lang.ClassLoader classloader,
                                                   IObjectWriterHandler handler)
        Convert to a string.
      • objectToByteArray

        public static byte[] objectToByteArray​(java.lang.Object val,
                                               java.lang.ClassLoader classloader,
                                               IObjectWriterHandler handler)
        Convert to a byte array.
      • objectToByteArray

        public static byte[] objectToByteArray​(java.lang.Object val,
                                               java.lang.String encoding,
                                               java.lang.ClassLoader classloader,
                                               IObjectWriterHandler handler)
        Convert to a byte array.
      • objectToOutputStream

        public static void objectToOutputStream​(java.lang.Object val,
                                                java.io.OutputStream os,
                                                java.lang.ClassLoader classloader,
                                                IObjectWriterHandler handler)
        Write to output stream.
      • getObjectHandler

        public static IObjectWriterHandler getObjectHandler()
        Get the default Java reader.
        Returns:
        The Java reader.