code: @Override
      public int getContentLength() {
          try {
              connect();
              if (jarEntry == null) {
                  return jarFileURLConnection.getContentLength();
              }
              return (int) getJarEntry().getSize();
          } catch (IOException e) {
              // Ignored
          }
          return -1;
      }
docs: Returns the content length of the resource. Test cases reveal that if the URL is referring to
  a Jar file, this method answers a content-length returned by URLConnection. For a jar entry
  it returns the entry's size if it can be represented as an {@code int}. Otherwise, it will
  return -1.