com.croftsoft.core.io
Class SerializableLib

java.lang.Object
  extended by com.croftsoft.core.io.SerializableLib

public final class SerializableLib
extends Object

Saves and loads Serializable objects using GZIP compression.

Since:
2001-04-25
Version:
2003-06-13
Author:
David Wallace Croft

Method Summary
static byte[] compress(Serializable serializable)
           
static Serializable copy(Serializable serializable)
           
static Serializable load(ClassLoader classLoader, String filename)
           
static Serializable load(InputStream inputStream)
           
static Serializable load(String filename)
           
static Serializable load(String primaryFilename, String fallbackFilename)
           
static Serializable load(String primaryFilename, String fallbackFilename, String fileContentsSpec, Applet applet, String persistenceKey, ClassLoader classLoader, String resourcePathFilename)
           
static void main(String[] args)
          Displays the result of test().
static void save(Serializable serializable, OutputStream outputStream)
           
static void save(Serializable serializable, String filename)
           
static void save(Serializable serializable, String filename, boolean makeDirs)
           
static void save(Serializable serializable, String latestFilename, String backupFilename)
           
static boolean save(Serializable serializable, String latestFilename, String backupFilename, String fileContentsSpec, Applet applet, String persistenceKey)
           
static boolean test(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
                 throws Exception
Displays the result of test().

Throws:
Exception

test

public static boolean test(String[] args)

compress

public static byte[] compress(Serializable serializable)
                       throws IOException
Throws:
IOException

copy

public static Serializable copy(Serializable serializable)
                         throws IOException
Throws:
IOException

load

public static Serializable load(InputStream inputStream)
                         throws ClassNotFoundException,
                                IOException
Throws:
ClassNotFoundException
IOException

load

public static Serializable load(String filename)
                         throws ClassNotFoundException,
                                IOException
Throws:
ClassNotFoundException
IOException

load

public static Serializable load(String primaryFilename,
                                String fallbackFilename)
                         throws ClassNotFoundException,
                                IOException
Throws:
ClassNotFoundException
IOException

load

public static Serializable load(ClassLoader classLoader,
                                String filename)
                         throws ClassNotFoundException,
                                IOException
Throws:
ClassNotFoundException
IOException

load

public static Serializable load(String primaryFilename,
                                String fallbackFilename,
                                String fileContentsSpec,
                                Applet applet,
                                String persistenceKey,
                                ClassLoader classLoader,
                                String resourcePathFilename)
                         throws ClassNotFoundException,
                                IOException
Throws:
ClassNotFoundException
IOException

save

public static void save(Serializable serializable,
                        OutputStream outputStream)
                 throws IOException
Throws:
IOException

save

public static void save(Serializable serializable,
                        String filename,
                        boolean makeDirs)
                 throws IOException
Throws:
IOException

save

public static void save(Serializable serializable,
                        String filename)
                 throws IOException
Throws:
IOException

save

public static void save(Serializable serializable,
                        String latestFilename,
                        String backupFilename)
                 throws IOException
Throws:
IOException

save

public static boolean save(Serializable serializable,
                           String latestFilename,
                           String backupFilename,
                           String fileContentsSpec,
                           Applet applet,
                           String persistenceKey)
                    throws IOException
Throws:
IOException

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)