de.schlichtherle.license
Class AbstractKeyStoreParam
java.lang.Object
de.schlichtherle.license.AbstractKeyStoreParam
- All Implemented Interfaces:
- KeyStoreParam
- Direct Known Subclasses:
- DefaultKeyStoreParam
public abstract class AbstractKeyStoreParam
- extends Object
- implements KeyStoreParam
This is a convenience class implementing the
KeyStoreParam.getStream() method.
- Author:
- Christian Schlichtherle
|
Constructor Summary |
protected |
AbstractKeyStoreParam(Class clazz,
String resource)
Creates a new instance of AbstractKeyStoreParam which will look up
the given resource using the class loader of the given class when
calling getStream(). |
|
Method Summary |
boolean |
equals(Object object)
Returns true if and only if these key store parameters seem to
address the same key store entry as the given object. |
InputStream |
getStream()
Looks up the resource provided to the constructor using the classloader
provided to the constructor and returns it as an InputStream. |
int |
hashCode()
Returns a hash code which is consistent with equals(Object). |
clazz
private final Class clazz
resource
private final String resource
AbstractKeyStoreParam
protected AbstractKeyStoreParam(Class clazz,
String resource)
- Creates a new instance of AbstractKeyStoreParam which will look up
the given resource using the class loader of the given class when
calling
getStream().
- Parameters:
clazz - the class which refers to the class loader to use.resource - the resource to look up.
equals
public final boolean equals(Object object)
- Returns
true if and only if these key store parameters seem to
address the same key store entry as the given object.
- Overrides:
equals in class Object
- Parameters:
object - the object to compare.
- Returns:
true if and only if these key store parameters seem to
address the same key store entry as the given object.
getStream
public InputStream getStream()
throws IOException
- Looks up the resource provided to the constructor using the classloader
provided to the constructor and returns it as an
InputStream.
- Specified by:
getStream in interface KeyStoreParam
- Returns:
- An input stream for reading the keystore
-
null is never returned.
- Throws:
IOException - If the key store cannot get opened.
hashCode
public final int hashCode()
- Returns a hash code which is consistent with
equals(Object).
- Overrides:
hashCode in class Object
- Returns:
- A hash code which is consistent with
equals(Object).
Copyright © 2005-2015 Schlichtherle IT Services. All Rights Reserved.