JMRTD 0.4.5b

org.jmrtd
Class PassportCertificateGenerator

java.lang.Object
  extended by org.jmrtd.PassportCertificateGenerator

public class PassportCertificateGenerator
extends Object

FIXME: Should this class still be here? Move it to passporthostapi-test project? -- MO

Author:
woj

Field Summary
static String filenameCA
           
static String filenameKey
           
static String filenameTerminal
           
 
Constructor Summary
PassportCertificateGenerator()
           
 
Method Summary
static byte[] loadFile(File file)
          Reads the byte data from a file.
static byte[] loadFile(String path)
          Reads the byte data from a file.
static void main(String[] args)
           
static org.ejbca.cvc.CVCertificate readCVCertificateFromFile(File f)
           
static void writeFile(File file, byte[] data)
          Writes raw data to a file.
static void writeFile(String path, byte[] data)
          Writes raw data to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filenameCA

public static final String filenameCA
See Also:
Constant Field Values

filenameTerminal

public static final String filenameTerminal
See Also:
Constant Field Values

filenameKey

public static final String filenameKey
See Also:
Constant Field Values
Constructor Detail

PassportCertificateGenerator

public PassportCertificateGenerator()
Method Detail

main

public static void main(String[] args)

readCVCertificateFromFile

public static org.ejbca.cvc.CVCertificate readCVCertificateFromFile(File f)

loadFile

public static byte[] loadFile(String path)
                       throws IOException
Reads the byte data from a file.

Parameters:
path - the path to the file
Returns:
the raw contents of the file
Throws:
IOException - if there are problems

loadFile

public static byte[] loadFile(File file)
                       throws IOException
Reads the byte data from a file.

Parameters:
file - the file object to read data from
Returns:
the raw contents of the file
Throws:
IOException - if there are problems

writeFile

public static void writeFile(String path,
                             byte[] data)
                      throws IOException
Writes raw data to a file.

Parameters:
path - path to the file to be written (no overwrite checks!)
data - raw data to be written
Throws:
IOException - if something goes wrong

writeFile

public static void writeFile(File file,
                             byte[] data)
                      throws IOException
Writes raw data to a file.

Parameters:
file - the file object to be written (no overwrite checks!)
data - raw data to be written
Throws:
IOException - if something goes wrong

JMRTD 0.4.5b