COM.claymoresystems.cert
Class WrappedObject

java.lang.Object
  extended by COM.claymoresystems.cert.WrappedObject

public class WrappedObject
extends java.lang.Object

Utilities to read -----BEGIN style Base64 encoded objects from files and the like. This is used to read what EAY refers to as "PEM" keyfiles. This class is used internally by PureTLS and should not be called by programmers. We'll document it someday, though


Constructor Summary
WrappedObject()
           
 
Method Summary
static byte[] base64Decode(java.lang.String in)
           
static java.lang.String base64Encode(byte[] in)
           
static boolean findObject(java.io.BufferedReader br, java.lang.String end, java.lang.StringBuffer type)
           
static byte[] loadObject(java.io.BufferedReader rdr, java.lang.String end, java.lang.StringBuffer type)
           
static byte[] readBlock(java.io.BufferedReader br)
          Read a base64 encoded block up to an -----END terminator, base64 decode it and return
static void writeHeader(java.lang.String type, java.io.BufferedWriter out)
           
static void writeObject(byte[] object, java.lang.String type, java.io.BufferedWriter out)
          Write a base64 encoded block, and add the terminator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrappedObject

public WrappedObject()
Method Detail

findObject

public static boolean findObject(java.io.BufferedReader br,
                                 java.lang.String end,
                                 java.lang.StringBuffer type)
                          throws java.io.IOException
Throws:
java.io.IOException

readBlock

public static byte[] readBlock(java.io.BufferedReader br)
                        throws java.io.IOException
Read a base64 encoded block up to an -----END terminator, base64 decode it and return

Throws:
java.io.IOException

writeHeader

public static void writeHeader(java.lang.String type,
                               java.io.BufferedWriter out)
                        throws java.io.IOException
Throws:
java.io.IOException

writeObject

public static void writeObject(byte[] object,
                               java.lang.String type,
                               java.io.BufferedWriter out)
                        throws java.io.IOException
Write a base64 encoded block, and add the terminator

Throws:
java.io.IOException

loadObject

public static byte[] loadObject(java.io.BufferedReader rdr,
                                java.lang.String end,
                                java.lang.StringBuffer type)
                         throws java.io.IOException
Throws:
java.io.IOException

base64Encode

public static java.lang.String base64Encode(byte[] in)
                                     throws java.io.IOException
Throws:
java.io.IOException

base64Decode

public static byte[] base64Decode(java.lang.String in)
                           throws java.io.IOException
Throws:
java.io.IOException


Copyright (c) 1999-2001 Claymore Systems, Inc., All Rights Reserved.