aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper/Parser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/helper/Parser.java')
-rw-r--r--src/org/traccar/helper/Parser.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/org/traccar/helper/Parser.java b/src/org/traccar/helper/Parser.java
index 582b497cf..1471ec237 100644
--- a/src/org/traccar/helper/Parser.java
+++ b/src/org/traccar/helper/Parser.java
@@ -109,6 +109,22 @@ public class Parser {
}
}
+ public Long nextLong() {
+ if (hasNext()) {
+ return Long.parseLong(next());
+ } else {
+ return null;
+ }
+ }
+
+ public Long nextHexLong() {
+ if (hasNext()) {
+ return Long.parseLong(next(), 16);
+ } else {
+ return null;
+ }
+ }
+
public long nextLong(long defaultValue) {
return nextLong(10, defaultValue);
}