org.apertereports.common.utils
Class ReportGeneratorUtils

java.lang.Object
  extended by org.apertereports.common.utils.ReportGeneratorUtils

public class ReportGeneratorUtils
extends Object


Constructor Summary
ReportGeneratorUtils()
           
 
Method Summary
static boolean canConvertToInputStreams(Object object)
           
static Object convertBytesToInputStreams(Object object)
           
static byte[] decodeContent(char[] content)
           
static byte[] decodeContent(String content)
           
static Object deserializeObject(byte[] bytes)
           
static String encodeContent(byte[] content)
           
static
<T> T
resolveFieldValue(ClassLoader classLoader, String className, String fieldName)
           
static byte[] serializeObject(Object object)
           
static byte[] unwrapDataHandler(DataHandler handler)
           
static DataHandler wrapBytesInDataHandler(byte[] content, String mimeType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportGeneratorUtils

public ReportGeneratorUtils()
Method Detail

resolveFieldValue

public static <T> T resolveFieldValue(ClassLoader classLoader,
                                      String className,
                                      String fieldName)
                           throws ClassNotFoundException,
                                  NoSuchFieldException,
                                  IllegalAccessException
Throws:
ClassNotFoundException
NoSuchFieldException
IllegalAccessException

decodeContent

public static byte[] decodeContent(String content)
                            throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

decodeContent

public static byte[] decodeContent(char[] content)
                            throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

encodeContent

public static String encodeContent(byte[] content)

deserializeObject

public static Object deserializeObject(byte[] bytes)
                                throws Exception
Throws:
Exception

serializeObject

public static byte[] serializeObject(Object object)
                              throws Exception
Throws:
Exception

wrapBytesInDataHandler

public static DataHandler wrapBytesInDataHandler(byte[] content,
                                                 String mimeType)
                                          throws IOException
Throws:
IOException

unwrapDataHandler

public static byte[] unwrapDataHandler(DataHandler handler)
                                throws AperteReportsException
Throws:
AperteReportsException

convertBytesToInputStreams

public static Object convertBytesToInputStreams(Object object)

canConvertToInputStreams

public static boolean canConvertToInputStreams(Object object)


Copyright © 2011-2012. All Rights Reserved.