1 package com.neuronrobotics.bowlerkernel;
3 import java.io.BufferedReader;
4 import java.io.IOException;
5 import java.io.InputStream;
6 import java.io.InputStreamReader;
16 private static final String
NAME =
"CommonWealthRobotics SDK "
26 String s =
getTag(
"app.version");
67 String[] splits = s.split(
"[.]+");
68 int[] rev =
new int[3];
69 for (
int i = 0; i < 3; i++) {
70 rev[i] =
new Integer(splits[i]);
81 private static String
getTag(String target) {
85 BufferedReader br =
new BufferedReader(
new InputStreamReader(is));
88 while (
null != (line = br.readLine())) {
91 }
catch (IOException e) {
93 String[] splitAll = s.split(
"[\n]+");
94 for (
int i = 0; i < splitAll.length; i++) {
95 if (splitAll[i].contains(target)) {
96 String[] split = splitAll[i].split(
"[=]+");
100 }
catch (NullPointerException e) {
114 .getResourceAsStream(
"/META-INF/MANIFEST.MF");
115 BufferedReader br =
new BufferedReader(
new InputStreamReader(is));
118 while (
null != (line = br.readLine())) {
121 }
catch (IOException e) {
151 return (System.getProperty(
"os.arch").indexOf(
"x86_64") != -1);
160 return (System.getProperty(
"os.arch").toLowerCase().indexOf(
"arm") != -1);
169 return (System.getProperty(
"os.name").toLowerCase().indexOf(
"linux") != -1);
178 return (System.getProperty(
"os.name").toLowerCase().indexOf(
"win") != -1);
187 return (System.getProperty(
"os.name").toLowerCase().indexOf(
"mac") != -1);
static String getTag(String target)
static boolean isWindows()
static String getBuildDate()
static String getSDKVersionString()
static InputStream getBuildPropertiesStream()
static int getSDKVersion()
static int[] getBuildInfo()
static int getProtocolVersion()
static String getVersion()
static int getBuildVersion()
static boolean isOS64bit()