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/NoranProtocolDecoder.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/NoranProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/NoranProtocolDecoder.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/org/traccar/protocol/NoranProtocolDecoder.java b/src/org/traccar/protocol/NoranProtocolDecoder.java index cf9cc75f7..8556ddc69 100644 --- a/src/org/traccar/protocol/NoranProtocolDecoder.java +++ b/src/org/traccar/protocol/NoranProtocolDecoder.java @@ -45,20 +45,20 @@ public class NoranProtocolDecoder extends BaseProtocolDecoder { private static final int MSG_SHAKE_HAND_RESPONSE = 0x8000; private static final int MSG_IMAGE_SIZE = 0x0200; private static final int MSG_IMAGE_PACKET = 0x0201; - + @Override protected Object decode( Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { - + ChannelBuffer buf = (ChannelBuffer) msg; - + buf.readUnsignedShort(); // length int type = buf.readUnsignedShort(); - + if (type == MSG_SHAKE_HAND && channel != null) { - + ChannelBuffer response = ChannelBuffers.dynamicBuffer(ByteOrder.LITTLE_ENDIAN, 13); response.writeBytes(ChannelBuffers.copiedBuffer(ByteOrder.LITTLE_ENDIAN, "\r\n*KW", Charset.defaultCharset())); response.writeByte(0); @@ -66,10 +66,10 @@ public class NoranProtocolDecoder extends BaseProtocolDecoder { response.writeShort(MSG_SHAKE_HAND_RESPONSE); response.writeByte(1); // status response.writeBytes(ChannelBuffers.copiedBuffer(ByteOrder.LITTLE_ENDIAN, "\r\n", Charset.defaultCharset())); - + channel.write(response, remoteAddress); } - + else if (type == MSG_UPLOAD_POSITION || type == MSG_UPLOAD_POSITION_NEW || type == MSG_CONTROL_RESPONSE || @@ -89,7 +89,7 @@ public class NoranProtocolDecoder extends BaseProtocolDecoder { // Create new position Position position = new Position(); position.setProtocol(getProtocolName()); - + if (type == MSG_CONTROL_RESPONSE) { buf.readUnsignedInt(); // GIS ip buf.readUnsignedInt(); // GIS port |