public static Long[] StringArray2LongArray(String[] stringArray)
{
List<Long> list=new ArrayList<>();
for (String str: stringArray) {
try {
list.add(Long.parseLong(str));
} catch (NumberFormatException e) {
e.printStackTrace();
}
}
Long[] longArray=list.toArray(new Long[list.size()]);
return longArray;
}