aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper/ChannelBufferTools.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/helper/ChannelBufferTools.java')
-rw-r--r--src/org/traccar/helper/ChannelBufferTools.java19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/org/traccar/helper/ChannelBufferTools.java b/src/org/traccar/helper/ChannelBufferTools.java
index 99da43b54..6c61287c9 100644
--- a/src/org/traccar/helper/ChannelBufferTools.java
+++ b/src/org/traccar/helper/ChannelBufferTools.java
@@ -17,6 +17,7 @@ package org.traccar.helper;
import org.jboss.netty.buffer.ChannelBuffer;
+import javax.xml.bind.DatatypeConverter;
import java.util.Formatter;
public final class ChannelBufferTools {
@@ -89,22 +90,4 @@ public final class ChannelBufferTools {
return value;
}
- public static byte[] hexToBytes(String in) {
- int count = in.length() / 2;
- byte[] out = new byte[count];
- for (int i = 0; i < count; i++) {
- out[i] = (byte) Integer.parseInt(in.substring(i * 2, (i + 1) * 2), 16);
- }
- return out;
- }
-
- public static String bytesToHex(byte[] in) {
- StringBuilder out = new StringBuilder();
- Formatter formatter = new Formatter(out);
- for (byte b : in) {
- formatter.format("%02x", b);
- }
- return out.toString();
- }
-
}