public static Serializable loadConfig ( InputStream source ) throws IOException { try { ObjectInputStream oin = new ObjectInputStream ( source ) ; return ( Serializable ) oin . readObject ( ) ; } catch ( ClassNotFoundException cnfe ) { String errmsg = "Unknown config class" ; throw ( IOException ) new IOException ( errmsg ) . initCause ( cnfe ) ; } }
Unserializes a configuration object from the supplied input stream .