Java BufferedReader Read loadPrivateKeyFile(File privateKeyFile)

Here you can find the source of loadPrivateKeyFile(File privateKeyFile)

Description

Reads in the private key verbatim from the private key file

License

Open Source License

Declaration

private static String loadPrivateKeyFile(File privateKeyFile) throws IOException 

Method Source Code


//package com.java2s;
// License as published by the Free Software Foundation; either

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

import java.io.IOException;

public class Main {
    /** Reads in the private key verbatim from the private key file */
    private static String loadPrivateKeyFile(File privateKeyFile) throws IOException {
        BufferedReader in = new BufferedReader(new FileReader(privateKeyFile));
        StringBuffer key_buf = new StringBuffer();

        String line;//w ww. ja  v a 2 s  . c o  m

        while ((line = in.readLine()) != null) {
            key_buf.append(line);
            key_buf.append('\n');
        }
        in.close();

        return key_buf.toString().trim();
    }
}

Related

  1. loadModel(String fileName, Hashtable dictionary, Hashtable> modelPairs)
  2. loadNameMap(String mapName, boolean reverseMap)
  3. loadNumUsers(String fileName)
  4. loadPartitions(String fileName)
  5. loadPathPreferencesFromFile(File inputFile)
  6. loadQueryFromFile(String queryFile)
  7. loadQueryNodeInfo(String input_file)
  8. loadReaderFromClasspath(Class c, String filename)
  9. loadReaderToList(Reader reader)