edu.vt.middleware.ldap.ssl
T
- Type of credential read by this instance.public abstract class AbstractCredentialReader<T> extends java.lang.Object implements CredentialReader<T>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSPATH_PREFIX
Prefix used to indicate a classpath resource.
|
static java.lang.String |
FILE_PREFIX
Prefix used to indicate a file resource.
|
protected org.apache.commons.logging.Log |
logger
Log for this class.
|
Constructor and Description |
---|
AbstractCredentialReader() |
Modifier and Type | Method and Description |
---|---|
protected java.io.InputStream |
getBufferedInputStream(java.io.InputStream is)
Gets a buffered input stream from the given input stream.
|
abstract T |
read(java.io.InputStream is,
java.lang.String... params)
Reads a credential object from an input stream.
|
T |
read(java.lang.String path,
java.lang.String... params)
Reads a credential object from a path.
|
public static final java.lang.String CLASSPATH_PREFIX
public static final java.lang.String FILE_PREFIX
protected final org.apache.commons.logging.Log logger
public T read(java.lang.String path, java.lang.String... params) throws java.io.IOException, java.security.GeneralSecurityException
read
in interface CredentialReader<T>
path
- Path from which to read credential.params
- Arbitrary string parameters, e.g. password, needed to read
the credential.java.io.IOException
- On IO errors.java.security.GeneralSecurityException
- On errors with the credential data.public abstract T read(java.io.InputStream is, java.lang.String... params) throws java.io.IOException, java.security.GeneralSecurityException
read
in interface CredentialReader<T>
is
- Input stream from which to read credential.params
- Arbitrary string parameters, e.g. password, needed to read
the credential.java.io.IOException
- On IO errors.java.security.GeneralSecurityException
- On errors with the credential data.protected java.io.InputStream getBufferedInputStream(java.io.InputStream is)
is
- Input stream from which to create buffered instance.Copyright © 2014. All Rights Reserved.