From 43814126839b863ac73452d395a0ec5e0d817d46 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 19 Oct 2015 12:04:22 +1300 Subject: Clean up some check style issues --- src/org/traccar/protocol/IntellitracFrameDecoder.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/org/traccar/protocol/IntellitracFrameDecoder.java') diff --git a/src/org/traccar/protocol/IntellitracFrameDecoder.java b/src/org/traccar/protocol/IntellitracFrameDecoder.java index 7c981a81b..4e6241a40 100644 --- a/src/org/traccar/protocol/IntellitracFrameDecoder.java +++ b/src/org/traccar/protocol/IntellitracFrameDecoder.java @@ -16,19 +16,16 @@ package org.traccar.protocol; import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandlerContext; -import org.jboss.netty.handler.codec.frame.DelimiterBasedFrameDecoder; +import org.jboss.netty.handler.codec.frame.LineBasedFrameDecoder; -public class IntellitracFrameDecoder extends DelimiterBasedFrameDecoder { +public class IntellitracFrameDecoder extends LineBasedFrameDecoder { private static final int MESSAGE_MINIMUM_LENGTH = 0; - private static final byte[] delimiter = {(byte) '\r', (byte) '\n'}; - public IntellitracFrameDecoder(int maxFrameLength) { - super(maxFrameLength, ChannelBuffers.wrappedBuffer(delimiter)); + super(maxFrameLength); } // example of sync header: 0xFA 0xF8 0x1B 0x01 0x81 0x60 0x33 0x3C -- cgit v1.2.3