From c62dd84c7ad4061c0c6d8a521c63857ccde461ba Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 1 Nov 2017 22:57:10 +1300 Subject: Support iStartrek VT900 protocol --- src/org/traccar/helper/Parser.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/org/traccar/helper/Parser.java') 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); } -- cgit v1.2.3