agave-common/common-core/src/main/java/org/iplantc/service/common/auth/AgaveMyProxyLogon.java
/**
	 * Writes the retrieved credentials to the specified filename.
	 */
Writes the retrieved credentials to the specified filename.
Writes the retrieved credentials to the specified filename .
public void saveCredentialsToFile(String filename) throws IOException,
	GeneralSecurityException {
		Iterator iter;
		X509Certificate certificate;
		PrintStream printStream;
		iter = this.certificateChain.iterator();
		certificate = (X509Certificate) iter.next();
		File outFile = new File(filename);
		outFile.delete();
		outFile.createNewFile();
		setFilePermissions(filename, "0600");
		printStream = new PrintStream(new FileOutputStream(outFile));
		printCert(certificate, printStream);
		printKey(keypair.getPrivate(), printStream);
		while (iter.hasNext()) {
			certificate = (X509Certificate) iter.next();
			printCert(certificate, printStream);
		}
	}
public void saveCredentialsToFile ( String filename ) throws IOException , GeneralSecurityException { Iterator iter ; X509Certificate certificate ; PrintStream printStream ; iter = this . certificateChain . iterator ( ) ; certificate = ( X509Certificate ) iter . next ( ) ; File outFile = new File ( filename ) ; outFile . delete ( ) ; outFile . createNewFile ( ) ; setFilePermissions ( filename , "0600" ) ; printStream = new PrintStream ( new FileOutputStream ( outFile ) ) ; printCert ( certificate , printStream ) ; printKey ( keypair . getPrivate ( ) , printStream ) ; while ( iter . hasNext ( ) ) { certificate = ( X509Certificate ) iter . next ( ) ; printCert ( certificate , printStream ) ; } }
Writes the retrieved credentials to the specified filename.
Writes the retrieved credentials to the specified filename .