public TrustSource add(File trustedCAPemFile){
  if (trustedCAPemFile == null) {
    throw new IllegalArgumentException("Trusted CA file cannot be null");
  }
  String pemFileContents;
  try {
    pemFileContents=Files.toString(trustedCAPemFile,Charset.forName("UTF-8"));
  }
 catch (  IOException e) {
    throw new UncheckedIOException("Unable to read file containing PEM-encoded trusted CAs: " + trustedCAPemFile.getAbsolutePath(),e);
  }
  return add(pemFileContents);
}

public TrustSource add ( File trustedCAPemFile ) { if ( trustedCAPemFile == null ) { throw new IllegalArgumentException ( "Trusted CA file cannot be null" ) ; } String pemFileContents ; try { pemFileContents = Files . toString ( trustedCAPemFile , Charset . forName ( "UTF-8" ) ) ; } catch ( IOException e ) { throw new UncheckedIOException ( "Unable to read file containing PEM-encoded trusted CAs: " + trustedCAPemFile . getAbsolutePath ( ) , e ) ; } return add ( pemFileContents ) ; }
returns a new trustsource containing the same trusted cas as this trustsource , plus zero or more cas contained in the pem - encoded file . the file may contain multiple certificates and may contain comments or other non - pem - encoded text , as long as the pem - encoded certificates are delimited by appropriate begin_certificate and end_certificate text blocks . the file may contain utf - 8 characters , but the pem - encoded certificate data itself must be us - ascii .
