class TempBlobConverter extends ComponentSupport {

  public InputStream getJarFromPackGz(final TempBlob tempBlob) throws IOException {
    Path tempFile = createTempFile("pack-file", "jar.pack");
    try (GZIPInputStream gzis = new GZIPInputStream(tempBlob.get()); OutputStream os = newOutputStream(tempFile)) {
      Unpacker unpacker = Pack200.newUnpacker();
      try (JarOutputStream jos = new JarOutputStream(os)) {
        unpacker.unpack(gzis, jos);
        return newInputStream(tempFile);
      }
    }
    finally {
      Files.delete(tempFile);
    }
  }

  public  TempBlobConverter();

}