|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jcetaglib.tools.FileTools
Tools to handle some common file operations.
Constructor Summary | |
FileTools()
Creates new FileTools |
Method Summary | |
static byte[] |
getBytesFromPEM(byte[] inbuf,
java.lang.String beginKey,
java.lang.String endKey)
Reads binary bytes from a PEM-file. |
static byte[] |
readFiletoBuffer(java.lang.String file)
Helpfunction to read a file to a byte array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileTools()
Method Detail |
public static byte[] getBytesFromPEM(byte[] inbuf, java.lang.String beginKey, java.lang.String endKey) throws java.io.IOException
Example:
-----BEGIN CERTIFICATE REQUEST----------END CERTIFICATE REQUEST-----
- Parameters:
inbuf
- input buffer containing PEM-formatted stuff.- Returns:
- byte[] containing binary Base64 decoded bytes.
- Throws:
java.io.IOException
- if the PEM file does not contain the right keys.
public static byte[] readFiletoBuffer(java.lang.String file) throws java.io.IOException
file
- filename of file.
java.io.IOException
- if the file does not exist or cannot be read.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |