|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.ldap.LdapUtil
public final class LdapUtil
LdapUtil provides helper methods for Ldap.
| Method Summary | |
|---|---|
static byte[] |
base64Decode(String value)
This will decode the supplied value as a base64 encoded string to a byte[]. |
static String |
base64Encode(byte[] value)
This will convert the supplied value to a base64 encoded string. |
static String |
base64Encode(String value)
This will convert the supplied value to a base64 encoded string. |
static boolean |
checkCredential(Object credential)
This checks a credential to ensure it is the right type and it is not empty. |
static byte[] |
readInputStream(InputStream is)
Reads the data in the supplied stream and returns it as a byte array. |
static byte[] |
readURL(URL url)
Reads the data at the supplied URL and returns it as a byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean checkCredential(Object credential)
credential - Object to check
boolean - whether the credential is validpublic static String base64Encode(byte[] value)
value - byte[] to base64 encode
Stringpublic static String base64Encode(String value)
value - String to base64 encode
Stringpublic static byte[] base64Decode(String value)
value - Object to base64 encode
String
public static byte[] readURL(URL url)
throws IOException
url - URL to read
byte[] read from URL
IOException - if an error occurs reading data
public static byte[] readInputStream(InputStream is)
throws IOException
is - InputStream to read
byte[] read from the stream
IOException - if an error occurs reading data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||