net.sf.jasperreports.engine.util

## Class JRSaver

- java.lang.Object
- - net.sf.jasperreports.engine.util.JRSaver

-     public final class JRSaver
      extends java.lang.Object

  Utility class that can be used when serializable objects must be saved on disk or sent over the network through an output stream.

  Both the `JasperDesign` and `JasperReport` classes implement the `java.io.Serializable` interface. This allows users to store their report templates as serialized objects either in their fully modifiable state (`JasperDesign` objects) or in their compiled form (`JasperReport` objects), using various methods exposed by this class.

  Version:
    $Id: JRSaver.java 7025 2014-04-17 07:55:02Z shertage $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `saveClassSource(java.lang.String source, java.io.File file)`
    `static void` | `saveObject(java.lang.Object obj, java.io.File file)`
    `static void` | `saveObject(java.lang.Object obj, java.io.OutputStream os)`
    `static void` | `saveObject(java.lang.Object obj, java.lang.String fileName)`
    `static void` | `saveResource(java.lang.String resource, java.io.File file)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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)

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com