diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-11-01 22:57:10 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-11-01 22:57:10 +1300 |
commit | c62dd84c7ad4061c0c6d8a521c63857ccde461ba (patch) | |
tree | b664b0a5b3ce57020aa1cf48dbd6400313d72bb5 /src/org/traccar/helper | |
parent | e82169ab20c6762d522168bbc062acf54e516777 (diff) | |
download | trackermap-server-c62dd84c7ad4061c0c6d8a521c63857ccde461ba.tar.gz trackermap-server-c62dd84c7ad4061c0c6d8a521c63857ccde461ba.tar.bz2 trackermap-server-c62dd84c7ad4061c0c6d8a521c63857ccde461ba.zip |
Support iStartrek VT900 protocol
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r-- | src/org/traccar/helper/Parser.java | 16 |
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); } |