public boolean writeTrustRoots ( String directory ) throws IOException { if ( this . trustrootFilenames == null || this . trustrootData == null ) { return false ; } File rootDir = new File ( directory ) ; if ( ! rootDir . exists ( ) ) { rootDir . mkdirs ( ) ; } for ( int i = 0 ; i < trustrootFilenames . length ; i ++ ) { FileOutputStream out = new FileOutputStream ( directory + File . separator + this . trustrootFilenames [ i ] ) ; out . write ( this . trustrootData [ i ] . getBytes ( ) ) ; out . close ( ) ; } return true ; }
Writes the retrieved trust roots to a trusted certificates directory .