25package org.cipherpack;
27import java.io.PrintStream;
28import java.util.Iterator;
30import java.util.jar.Attributes;
31import java.util.jar.Manifest;
33import org.jau.io.PrintUtil;
34import org.jau.util.JauVersion;
35import org.jau.util.VersionUtil;
48 out.println(VersionUtil.getPlatformInfo());
49 PrintUtil.println(out,
"Version Info:");
51 out.println(v.toString());
52 PrintUtil.println(out,
"");
53 PrintUtil.println(out,
"Full Manifest:");
54 out.println(v.getFullManifestInfo(
null).toString());
56 PrintUtil.println(out,
"Full Manifest:");
58 final Attributes attr = manifest.getMainAttributes();
59 final Set<Object> keys = attr.keySet();
60 final StringBuilder sb =
new StringBuilder();
61 for(
final Iterator<Object> iter=keys.iterator(); iter.hasNext(); ) {
62 final Attributes.Name key = (Attributes.Name) iter.next();
63 final String val = attr.getValue(key);
68 sb.append(System.lineSeparator());
70 out.println(sb.toString());
77 protected CPVersion(
final String packageName,
final Manifest mf) {
78 super(packageName, mf);
85 final String packageNameCompileTime =
"org.cipherpack";
86 final String packageNameRuntime =
"org.cipherpack";
87 Manifest mf = VersionUtil.getManifest(
CPVersion.class.getClassLoader(), packageNameRuntime);
89 return new CPVersion(packageNameRuntime, mf);
91 mf = VersionUtil.getManifest(
CPVersion.class.getClassLoader(), packageNameCompileTime);
92 return new CPVersion(packageNameCompileTime, mf);
96 public static void main(
final String args[]) {
Cipherpack Factory, called by automatically to load the native library.
static final Manifest getManifest(final ClassLoader cl, final String[] extensions)
Helper function to retrieve a Manifest instance.
static native String getNativeVersion()
static final boolean JAULIB_JARCACHE_USED
True if jaulib JAULIB_AVAILABLE and its org.jau.sys.PlatformProps#USE_TEMP_JAR_CACHE is true,...
static final boolean JAULIB_AVAILABLE
True if jaulib org.jau.sys.PlatformProps has been detected.
static native String getNativeAPIVersion()
static final String getImplVersion()
Manifest's Attributes.Name#IMPLEMENTATION_VERSION or null if not available.
static final String getAPIVersion()
Manifest's Attributes.Name#SPECIFICATION_VERSION or null if not available.
static synchronized void initLibrary()
static void main(final String args[])
This jaulib derived version info class is only usable when having jaulib available,...
CPVersion(final String packageName, final Manifest mf)
static final void printVersionInfo(final PrintStream out)
static void main(final String args[])
static CPVersion getInstance()
Returns a transient new instance.