aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gt06ProtocolEncoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-09 11:43:50 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-09 11:43:50 +1300
commit81a7fba08c37fd8032c747ada5d9a77340298647 (patch)
treeb7b0534868dfc130d1b8779ff0b8c7bf8c149dc5 /src/org/traccar/protocol/Gt06ProtocolEncoder.java
parent8e555ab17b231d93ab51713d6cb25510c0f92476 (diff)
downloadtrackermap-server-81a7fba08c37fd8032c747ada5d9a77340298647.tar.gz
trackermap-server-81a7fba08c37fd8032c747ada5d9a77340298647.tar.bz2
trackermap-server-81a7fba08c37fd8032c747ada5d9a77340298647.zip
Fix some FindBugs and style issues
Diffstat (limited to 'src/org/traccar/protocol/Gt06ProtocolEncoder.java')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolEncoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolEncoder.java b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
index f5b914b1c..f518d422d 100644
--- a/src/org/traccar/protocol/Gt06ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
@@ -21,6 +21,8 @@ import org.traccar.BaseProtocolEncoder;
import org.traccar.helper.Checksum;
import org.traccar.model.Command;
+import java.nio.charset.Charset;
+
public class Gt06ProtocolEncoder extends BaseProtocolEncoder {
private ChannelBuffer encodeContent(String content) {
@@ -36,7 +38,7 @@ public class Gt06ProtocolEncoder extends BaseProtocolEncoder {
buf.writeByte(4 + content.length()); // command length
buf.writeInt(0);
- buf.writeBytes(content.getBytes()); // command
+ buf.writeBytes(content.getBytes(Charset.defaultCharset())); // command
buf.writeShort(0); // message index