code: public static Object streamIn(InputStream in, ClassLoader classLoader, boolean compressed)
              throws IOException, ClassNotFoundException {
          if (compressed)
              in  = new GZIPInputStream(in);
          return new DroolsObjectInputStream(in, classLoader).readObject();
       }
docs: This method reads the contents from the given input stream and returns the object.  The contents in the given
  stream could be compressed or uncompressed depending on the given flag.  It is assumed that the content
  stream was written by the corresponding streamOut methods of this class.
  @param in
  @return
  @throws IOException
  @throws ClassNotFoundException