Package net.sf.jasperreports.engine.util
Class JRSaver
- java.lang.Object
-
- net.sf.jasperreports.engine.util.JRSaver
-
public final class JRSaver extends java.lang.ObjectUtility class that can be used when serializable objects must be saved on disk or sent over the network through an output stream.Both the
JasperDesignandJasperReportclasses implement thejava.io.Serializableinterface. This allows users to store their report templates as serialized objects either in their fully modifiable state (JasperDesignobjects) or in their compiled form (JasperReportobjects), using various methods exposed by this class.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEXCEPTION_MESSAGE_KEY_EXPRESSIONS_CLASS_FILE_SAVE_ERRORstatic java.lang.StringEXCEPTION_MESSAGE_KEY_FILE_SAVE_ERRORstatic java.lang.StringEXCEPTION_MESSAGE_KEY_OUTPUT_STREAM_SAVE_ERROR
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsaveClassSource(java.lang.String source, java.io.File file)static voidsaveObject(java.lang.Object obj, java.io.File file)static voidsaveObject(java.lang.Object obj, java.io.OutputStream os)static voidsaveObject(java.lang.Object obj, java.lang.String fileName)static voidsaveResource(java.lang.String resource, java.io.File file)
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_EXPRESSIONS_CLASS_FILE_SAVE_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_EXPRESSIONS_CLASS_FILE_SAVE_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_FILE_SAVE_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_FILE_SAVE_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_OUTPUT_STREAM_SAVE_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_OUTPUT_STREAM_SAVE_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
saveObject
public static void saveObject(java.lang.Object obj, java.lang.String fileName) throws JRException- Throws:
JRException
-
saveObject
public static void saveObject(java.lang.Object obj, java.io.File file) throws JRException- Throws:
JRException
-
saveObject
public static void saveObject(java.lang.Object obj, java.io.OutputStream os) throws JRException- Throws:
JRException
-
saveClassSource
public static void saveClassSource(java.lang.String source, java.io.File file) throws JRException- Throws:
JRException
-
saveResource
public static void saveResource(java.lang.String resource, java.io.File file)
-
-