private void init() throws GeneralSecurityException, IOException {
   // Unfortunately, we don't know that the signature is
   // correct until we have read the whole stream.
   // So, we read the stream until the end, and we see if we
   // get any exception.
   long a = 0;
   if (_logger.isInfoEnabled()) {
     a = System.currentTimeMillis();
   }
   byte buffer[] = new byte[1000];
   try {
     while (in.read(buffer, 0, buffer.length) != -1) ;
   } catch (Exception e) {
     String message = "Invalid JAR file";
     if (_url != null) {
       message += ": " + _url;
     }
     GeneralSecurityException gse = new GeneralSecurityException(message);
     gse.initCause(e);
     throw gse;
   }
   if (_logger.isInfoEnabled()) {
     long b = System.currentTimeMillis();
     m_totalTime += (b - a);
     _logger.info("Time spent: " + (b - a) + " Total: " + m_totalTime);
   }
 }