aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/SabertekFrameDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/SabertekFrameDecoder.java')
-rw-r--r--src/org/traccar/protocol/SabertekFrameDecoder.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/SabertekFrameDecoder.java b/src/org/traccar/protocol/SabertekFrameDecoder.java
index bf7af81da..35dcd8928 100644
--- a/src/org/traccar/protocol/SabertekFrameDecoder.java
+++ b/src/org/traccar/protocol/SabertekFrameDecoder.java
@@ -15,23 +15,23 @@
*/
package org.traccar.protocol;
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.handler.codec.frame.FrameDecoder;
+import io.netty.buffer.ByteBuf;
+import io.netty.channel.Channel;
+import io.netty.channel.ChannelHandlerContext;
+import org.traccar.BaseFrameDecoder;
-public class SabertekFrameDecoder extends FrameDecoder {
+public class SabertekFrameDecoder extends BaseFrameDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception {
+ ChannelHandlerContext ctx, Channel channel, ByteBuf buf) throws Exception {
int beginIndex = buf.indexOf(buf.readerIndex(), buf.writerIndex(), (byte) 0x02);
if (beginIndex >= 0) {
int endIndex = buf.indexOf(buf.readerIndex(), buf.writerIndex(), (byte) 0x03);
if (beginIndex >= 0) {
buf.readerIndex(beginIndex + 1);
- ChannelBuffer frame = buf.readBytes(endIndex - beginIndex - 1);
+ ByteBuf frame = buf.readBytes(endIndex - beginIndex - 1);
buf.readerIndex(endIndex + 1);
buf.skipBytes(2); // end line
return frame;