diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-04 13:20:46 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-04 13:20:46 +1300 |
commit | d4dbf85d9536bfec85252a58fc552e2bad42ff17 (patch) | |
tree | 4a849426c2cd60538b152138b147abef47b40966 /src/org/traccar/protocol/MeiligaoProtocolDecoder.java | |
parent | 9218bc65b9673b24d2866aae3d5bbe1a5388bab0 (diff) | |
download | trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.tar.gz trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.tar.bz2 trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.zip |
Remove trailing whitespaces from code
Diffstat (limited to 'src/org/traccar/protocol/MeiligaoProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/MeiligaoProtocolDecoder.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java index faf3a5baf..e50b4f60b 100644 --- a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java +++ b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java @@ -18,7 +18,7 @@ package org.traccar.protocol; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.charset.Charset; -import java.util.Calendar; +import java.util.Calendar; import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -73,13 +73,13 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder { private static final int MSG_SERVER = 0x0002; private static final int MSG_LOGIN = 0x5000; private static final int MSG_LOGIN_RESPONSE = 0x4000; - + private static final int MSG_POSITION = 0x9955; private static final int MSG_POSITION_LOGGED = 0x9016; private static final int MSG_ALARM = 0x9999; private static final int MSG_RFID = 0x9966; - + private boolean identify(ChannelBuffer buf, Channel channel) { String id = ""; @@ -107,14 +107,14 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder { return identify(id, channel); } - + private static void sendResponse( Channel channel, ChannelBuffer id, int type, ChannelBuffer msg) { - + if (channel != null) { ChannelBuffer buf = ChannelBuffers.buffer( 2 + 2 + id.readableBytes() + 2 + msg.readableBytes() + 2 + 2); - + buf.writeByte('@'); buf.writeByte('@'); buf.writeShort(buf.capacity()); @@ -128,7 +128,7 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder { channel.write(buf); } } - + private String getMeiligaoServer(Channel channel) { String server = Context.getConfig().getString(getProtocolName() + ".server"); if (server == null) { @@ -142,14 +142,14 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder { protected Object decode( Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { - + ChannelBuffer buf = (ChannelBuffer) msg; buf.skipBytes(2); // header buf.readShort(); // length ChannelBuffer id = buf.readBytes(7); int command = buf.readUnsignedShort(); ChannelBuffer response; - + switch (command) { case MSG_LOGIN: if (channel != null) { |