private static Certificate[] loadCertificates(JarFile jarFile, JarEntry je,
            byte[] readBuffer) {
        try {
            // We must read the stream for the JarEntry to retrieve
            // its certificates.
            InputStream is = new BufferedInputStream(jarFile.getInputStream(je));
            while (is.read(readBuffer, 0, readBuffer.length) != -1) {
                // not using
            }
            is.close();
            return je != null ? je.getCertificates() : null;
        } catch (IOException e) {
            System.out.println("Error while extracting certificates from file! Returning null!");
            e.printStackTrace();
        } catch (RuntimeException e) {
            System.out.println("Error while extracting certificates from file! Returning null!");
            e.printStackTrace();
        }
        return null;
    }