org.linkedin.util-core/src/main/java/org/linkedin/util/io/resource/JarResource.java
@Override
  public InputStream getInputStream() throws IOException
  {
    JarFile contentJarFile = getContentJarFile();
    try
    {
      CloseJarFileInputStream jarFileInputStream =
        new CloseJarFileInputStream(this, contentJarFile, _fullPath);

      // we are delegating the closure of the jar file to the input stream...
      contentJarFile = null;
      return jarFileInputStream;
    }
    finally
    {
      if(contentJarFile != null)
        contentJarFile.close();
    }
  }
@Override
  public InputStream getInputStream() throws IOException
  {
    JarFile contentJarFile = getContentJarFile();
    try
    {
      CloseJarFileInputStream jarFileInputStream =
        new CloseJarFileInputStream(this, contentJarFile, _fullPath);

      // we are delegating the closure of the jar file to the input stream...
      contentJarFile = null;
      return jarFileInputStream;
    }
    finally
    {
      if(contentJarFile != null)
        contentJarFile.close();
    }
  }
Important note: the caller of this method is responsible for properly closing the input
stream!

@return an input stream to the resource.
@throws IOException if cannot get an input stream