com.sas
Class ObjectLoader

com.sas.ObjectLoader

public class ObjectLoader

ObjectLoader Purpose: Helper class to load objects from a .ser file and show progress


Field Summary
protected  java.lang.Object m_container
           
static java.lang.String RB_KEY
           
 
Constructor Summary
ObjectLoader(java.lang.Object container)
           
 
Method Summary
protected  java.lang.String formatTime(int seconds)
           
 java.lang.Object loadObject(java.io.InputStream in)
          Load a single object from the given raw input stream.
 java.util.Hashtable loadObjects(java.io.InputStream in, java.util.Vector names)
          Load the objects from the given raw input stream into a hashtable.
 java.util.Hashtable loadObjects(java.io.ObjectInputStream in, java.util.Vector names)
          Load the objects from the given object input stream into a hashtable.
protected  void showStatus(java.lang.String s)
           
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

m_container

protected java.lang.Object m_container
Constructor Detail

ObjectLoader

public ObjectLoader(java.lang.Object container)
Method Detail

loadObjects

public java.util.Hashtable loadObjects(java.io.InputStream in,
                                       java.util.Vector names)
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException
Load the objects from the given raw input stream into a hashtable. The hashtable contains the each object with the IDE name as the key. This method will first read the entire contents of the input stream into an internal buffer which will then be converted into an object input stream.

Parameters:
in - Input stream to read the objects from
names - Names of any models to be loaded
Returns:
Hashtable containing the deserialized objects
Throws:
java.io.IOException - Some type of I/O exception
java.lang.ClassNotFoundException - A class was not found during deserialization

loadObject

public java.lang.Object loadObject(java.io.InputStream in)
                            throws java.io.IOException,
                                   java.lang.ClassNotFoundException
Load a single object from the given raw input stream. This method will first read the entire contents of the input stream into an internal buffer which will then be converted into an object input stream.

Parameters:
in - Input stream to read the objects from
Returns:
The deserialized object
Throws:
java.io.IOException - Some type of I/O exception
java.lang.ClassNotFoundException - A class was not found during deserialization

loadObjects

public java.util.Hashtable loadObjects(java.io.ObjectInputStream in,
                                       java.util.Vector names)
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException
Load the objects from the given object input stream into a hashtable. The hashtable contains the each object with the IDE name as the key.

Parameters:
in - Input stream to read the objects from
names - Names of any models to be loaded
Returns:
Hashtable containing the deserialized objects
Throws:
java.io.IOException - Some type of I/O exception
java.lang.ClassNotFoundException - A class was not found during deserialization

showStatus

protected void showStatus(java.lang.String s)

formatTime

protected java.lang.String formatTime(int seconds)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.