1 package com.neuronrobotics.sdk.config;
3 import java.io.BufferedReader;
4 import java.io.IOException;
5 import java.io.InputStream;
6 import java.io.InputStreamReader;
14 private static final String
NAME =
"Neuron Robotics SDK "
24 String s =
getTag(
"app.version");
64 String[] splits = s.split(
"[.]+");
65 int[] rev =
new int[3];
66 for (
int i = 0; i < 3; i++) {
67 rev[i] =
new Integer(splits[i]);
78 private static String
getTag(String target) {
82 BufferedReader br =
new BufferedReader(
new InputStreamReader(is));
85 while (
null != (line = br.readLine())) {
88 }
catch (IOException e) {
90 String[] splitAll = s.split(
"[\n]+");
91 for (
int i = 0; i < splitAll.length; i++) {
92 if (splitAll[i].contains(target)) {
93 String[] split = splitAll[i].split(
"[=]+");
97 }
catch (NullPointerException e) {
111 .getResourceAsStream(
"/META-INF/MANIFEST.MF");
112 BufferedReader br =
new BufferedReader(
new InputStreamReader(is));
115 while (
null != (line = br.readLine())) {
118 }
catch (IOException e) {
130 return SDKBuildInfo.class.getResourceAsStream(
"build.properties");
148 return (System.getProperty(
"os.arch").indexOf(
"x86_64") != -1);
157 return (System.getProperty(
"os.arch").toLowerCase().indexOf(
"arm") != -1);
166 return (System.getProperty(
"os.name").toLowerCase().indexOf(
"linux") != -1);
175 return (System.getProperty(
"os.name").toLowerCase().indexOf(
"win") != -1);
184 return (System.getProperty(
"os.name").toLowerCase().indexOf(
"mac") != -1);
static int[] getBuildInfo()
static String getBuildDate()
static String getSDKVersionString()
static InputStream getBuildPropertiesStream()
static int getBuildVersion()
static String getVersion()
static boolean isWindows()
static String getTag(String target)
static int getProtocolVersion()
static boolean isOS64bit()
static int getSDKVersion()