27import java.io.IOException;
28import java.io.PrintStream;
29import java.net.URISyntaxException;
30import java.security.MessageDigest;
31import java.security.NoSuchAlgorithmException;
32import java.util.ArrayList;
33import java.util.Iterator;
36import java.util.jar.Attributes;
37import java.util.jar.Manifest;
38import java.util.regex.Pattern;
40import org.jau.base.JaulibVersion;
41import org.jau.io.PrintUtil;
42import org.jau.pkg.TempJarSHASum;
43import org.jau.sec.SHASum;
44import org.jau.util.JauVersion;
45import org.jau.util.VersionUtil;
65 out.println(VersionUtil.getPlatformInfo());
66 PrintUtil.println(out,
"Version Info:");
68 out.println(v.toString());
69 PrintUtil.println(out,
"");
70 PrintUtil.println(out,
"Full Manifest:");
71 out.println(v.getFullManifestInfo(
null).toString());
73 PrintUtil.println(out,
"Full Manifest:");
75 final Attributes attr = manifest.getMainAttributes();
76 final Set<Object> keys = attr.keySet();
77 final StringBuilder sb =
new StringBuilder();
78 for(
final Iterator<Object> iter=keys.iterator(); iter.hasNext(); ) {
79 final Attributes.Name key = (Attributes.Name) iter.next();
80 final String val = attr.getValue(key);
85 sb.append(System.lineSeparator());
87 out.println(sb.toString());
95 super(packageName, mf);
102 final String packageNameCompileTime =
"org.direct_bt";
103 final String packageNameRuntime =
"org.direct_bt";
104 Manifest mf = VersionUtil.getManifest(
DirectBTVersion.class.getClassLoader(), packageNameRuntime);
108 mf = VersionUtil.getManifest(
DirectBTVersion.class.getClassLoader(), packageNameCompileTime);
132 throws SecurityException, IllegalArgumentException, NoSuchAlgorithmException, IOException, URISyntaxException
134 super(MessageDigest.getInstance(
"SHA-256"), JaulibVersion.class,
new ArrayList<Pattern>(),
new ArrayList<Pattern>());
135 final List<Pattern> includes = getIncludes();
136 final String origin = getOrigin();
137 includes.add(Pattern.compile(origin+
"/org/direct_bt/.*"));
138 includes.add(Pattern.compile(origin+
"/jau/direct_bt/.*"));
141 public static void main(
final String args[]) {
One stop BTManager API entry point.
static native String getNativeVersion()
static void main(final String args[])
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 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 native String getNativeAPIVersion()
static synchronized void initDirectBTLibrary()
Preloads the DirectBT native library w/o instantiating BTManager.
static final Manifest getManifest(final ClassLoader cl, final String[] extensions)
Helper function to retrieve a Manifest instance.
static final boolean JAULIB_AVAILABLE
True if jaulib org.jau.sys.PlatformProps has been detected.
Direct-BT definition of TempJarSHASum's specialization of SHASum.
JarSHASum()
See DirectBTJarSHASum.
This jaulib derived version info class is only usable when having jaulib available,...
static final void printVersionInfo(final PrintStream out)
Print full Direct-BT version information.
DirectBTVersion(final String packageName, final Manifest mf)
static void main(final String args[])
static DirectBTVersion getInstance()
Returns a transient new instance.