its.backbone.domain
Class ReadJar

java.lang.Object
  extended byits.backbone.domain.ReadJar

public class ReadJar
extends java.lang.Object


Constructor Summary
ReadJar()
          constructor
 
Method Summary
 void dissolveLoader()
          dissolve loader, sets the loader to null
 java.lang.Object instantiateDataFactory()
          instantiates a data factory object
static void main(java.lang.String[] args)
          main method
 void readByteArray(byte[] bytes)
          Reads an entire Jar formatted object stored in a byte[] array, loading all classes contained therein.
 void readFile(java.io.File file)
          Reads an entire Jar formatted object from a file, loading all classes contained therein.
 void readZipInputStream(java.util.zip.ZipInputStream zis)
          Reads an entire Jar formatted object, loading all classes contained therein.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadJar

public ReadJar()
constructor

Method Detail

readFile

public void readFile(java.io.File file)
              throws java.lang.IllegalArgumentException,
                     java.io.IOException,
                     java.lang.ClassNotFoundException
Reads an entire Jar formatted object from a file, loading all classes contained therein.

Parameters:
file - a file object
Throws:
java.io.IOException - thrown if the file cannot be read properly
java.lang.IllegalArgumentException - thrown if the file is null
java.lang.ClassNotFoundException - thrown if a class cannot be found by the class loader

readZipInputStream

public void readZipInputStream(java.util.zip.ZipInputStream zis)
                        throws java.lang.IllegalArgumentException,
                               java.io.IOException,
                               java.lang.ClassNotFoundException
Reads an entire Jar formatted object, loading all classes contained therein. The object is contained in a ZipInputStream, which could be compressed.

Parameters:
zis - a ZipInputStream object
Throws:
java.io.IOException - thrown if the zis cannot be read properly
java.lang.IllegalArgumentException - thrown if the zis is null
java.lang.ClassNotFoundException - thrown if a class cannot be found by the class loader

readByteArray

public void readByteArray(byte[] bytes)
                   throws java.lang.IllegalArgumentException,
                          java.io.IOException,
                          java.lang.ClassNotFoundException
Reads an entire Jar formatted object stored in a byte[] array, loading all classes contained therein.

Parameters:
bytes - a byte array
Throws:
java.io.IOException - thrown if the byte[] array cannot be read properly
java.lang.IllegalArgumentException - thrown if the byte[] array is null or empty
java.lang.ClassNotFoundException - thrown if a class cannot be found by the class loader

instantiateDataFactory

public java.lang.Object instantiateDataFactory()
                                        throws java.lang.Exception
instantiates a data factory object

Returns:
a data factory object usable by the Extractor (@see Extractor) class
Throws:
java.lang.Exception

dissolveLoader

public void dissolveLoader()
dissolve loader, sets the loader to null


main

public static void main(java.lang.String[] args)
                 throws java.lang.IllegalArgumentException
main method

Parameters:
args - String[] of input arguments
Throws:
java.lang.IllegalArgumentException - thrown if bad inputs.