|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jp.protection.pub.pro.ls.BasicLicenseStorage com.jp.protection.pub.pro.ls.JarLicenseStorage
public class JarLicenseStorage
Jar file based implementation of the LicenseStorage
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jp.protection.pub.pro.ls.BasicLicenseStorage |
---|
BasicLicenseStorage.BasicLicenseEntry, BasicLicenseStorage.EntryLicenseReader |
Nested classes/interfaces inherited from interface com.jp.protection.pub.pro.ls.LicenseStorage |
---|
LicenseStorage.LicenseEntry |
Field Summary | |
---|---|
static byte[] |
COOKIE
|
protected static byte[] |
EMPTY_LICENSE_BYTES
|
static java.lang.String |
EXTENSION_LICENSE_ENTRY
|
protected java.security.MessageDigest |
fMessageDigest
|
protected boolean |
fSeparateLicense
|
static java.util.jar.Attributes.Name |
PROPERTY_DIGEST
|
static java.util.jar.Attributes.Name |
PROPERTY_SEPARATE_LICENSE
|
static java.lang.String |
ROOT_LICENSE_ENTRIES
|
Fields inherited from class com.jp.protection.pub.pro.ls.BasicLicenseStorage |
---|
fLicenseEntryIDMap, fLicenseEntryMap, fLicenseStorageListeners, fModified |
Fields inherited from interface com.jp.protection.pub.pro.ls.LicenseStorage |
---|
ANY_LICENSE_TYPE, ANY_MAJOR_VERSION, ANY_MINOR_VERSION, ANY_PRODUCT, ANY_PRODUCT_EDITION, ANY_USER_LICENSING_MODEL |
Constructor Summary | |
---|---|
JarLicenseStorage()
|
Method Summary | |
---|---|
protected void |
addJarEntry(java.util.jar.JarOutputStream jarOutputStream,
java.io.InputStream anInputStream,
java.lang.String anEntryName)
|
LicenseReader |
createLicenseReader(java.lang.String aLicenseEntryName)
Creates and returns LicenseReader instance capable of reading license from the license storage |
protected java.util.jar.Manifest |
createManifest()
|
protected byte[] |
getDigest()
|
protected java.io.InputStream |
getInputStream(LicenseStorage.LicenseEntry aLicenseEntry)
|
protected java.lang.String |
getJarEntryName(LicenseStorage.LicenseEntry anEntry)
|
protected java.lang.String |
getLicenseBytesEntryName(java.util.jar.JarEntry aJarEntry)
|
protected java.lang.String |
getLicenseBytesJarEntryName(LicenseStorage.LicenseEntry anEntry)
|
protected java.lang.String |
getLicenseEntryName(java.util.jar.JarEntry aJarEntry)
|
protected java.io.InputStream |
getLicenseInputStream(LicenseStorage.LicenseEntry aLicenseEntry)
|
protected java.security.MessageDigest |
getMessageDigest()
|
protected boolean |
isLicenseBytesEntry(java.util.jar.JarEntry aJarEntry)
|
boolean |
isSeparateLicense()
Returns whether license entry and license itself should be stored as different entries in the Jar file |
void |
load(java.io.File aFile)
Loads license storage from the Jar file |
void |
load(java.io.InputStream anInputStream)
Loads license storage from the given stream |
protected void |
loadLicenseEntry(java.util.jar.JarInputStream aJarInputStream,
java.util.jar.JarEntry aJarEntry)
|
protected void |
resetDigest()
|
void |
setSeparateLicense(boolean aSeparateLicense)
Specifies that license entry and license itself should be stored as different entries in the Jar file |
void |
store(java.io.File aFile)
Stores license storage to the Jar file |
void |
store(java.io.OutputStream anOutputStream)
Stores license storage to the given stream |
protected void |
storeLicenseEntries(java.util.jar.JarOutputStream jarOutputStream)
|
protected void |
updateDigest(byte[] aBytes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ROOT_LICENSE_ENTRIES
public static final java.lang.String EXTENSION_LICENSE_ENTRY
public static final java.util.jar.Attributes.Name PROPERTY_DIGEST
public static final java.util.jar.Attributes.Name PROPERTY_SEPARATE_LICENSE
public static final byte[] COOKIE
protected boolean fSeparateLicense
protected static final byte[] EMPTY_LICENSE_BYTES
protected java.security.MessageDigest fMessageDigest
Constructor Detail |
---|
public JarLicenseStorage()
Method Detail |
---|
public void load(java.io.File aFile) throws java.io.IOException
aFile
- Jar file to load license storage from
java.io.IOException
- for any errors occured during loadingpublic void load(java.io.InputStream anInputStream) throws java.io.IOException
LicenseStorage
anInputStream
- stream to load license storage from
java.io.IOException
- for any errors occured during loadingprotected boolean isLicenseBytesEntry(java.util.jar.JarEntry aJarEntry)
protected void loadLicenseEntry(java.util.jar.JarInputStream aJarInputStream, java.util.jar.JarEntry aJarEntry) throws java.io.IOException
java.io.IOException
protected java.lang.String getLicenseEntryName(java.util.jar.JarEntry aJarEntry)
protected java.lang.String getLicenseBytesEntryName(java.util.jar.JarEntry aJarEntry)
public void store(java.io.File aFile) throws java.io.IOException
aFile
- Jar file to store license storage to
java.io.IOException
- for any errors occured during storingpublic void store(java.io.OutputStream anOutputStream) throws java.io.IOException
LicenseStorage
anOutputStream
- stream to store license storage to
java.io.IOException
- for any errors occured during storingprotected java.util.jar.Manifest createManifest()
protected void storeLicenseEntries(java.util.jar.JarOutputStream jarOutputStream) throws java.io.IOException
java.io.IOException
public boolean isSeparateLicense()
true
if license entry and license itself should be stored as different entries in the Jar file;
false
otherwisepublic void setSeparateLicense(boolean aSeparateLicense)
aSeparateLicense
- true
if license entry and license itself should be stored as different entries in the Jar file;
false
otherwiseprotected java.lang.String getJarEntryName(LicenseStorage.LicenseEntry anEntry)
protected java.lang.String getLicenseBytesJarEntryName(LicenseStorage.LicenseEntry anEntry)
protected java.io.InputStream getInputStream(LicenseStorage.LicenseEntry aLicenseEntry) throws java.io.IOException
java.io.IOException
protected java.io.InputStream getLicenseInputStream(LicenseStorage.LicenseEntry aLicenseEntry) throws java.io.IOException
java.io.IOException
protected void addJarEntry(java.util.jar.JarOutputStream jarOutputStream, java.io.InputStream anInputStream, java.lang.String anEntryName) throws java.io.IOException
java.io.IOException
protected void updateDigest(byte[] aBytes)
protected void resetDigest()
protected byte[] getDigest()
protected java.security.MessageDigest getMessageDigest()
public LicenseReader createLicenseReader(java.lang.String aLicenseEntryName)
LicenseStorage
LicenseReader
instance capable of reading license from the license storage
aLicenseEntryName
- name of the license entry to get License Reader for
LicenseReader
instance
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |