diff options
Diffstat (limited to 'test/org/traccar/ProtocolTest.java')
-rw-r--r-- | test/org/traccar/ProtocolTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java index 1b5c0ea00..181af885d 100644 --- a/test/org/traccar/ProtocolTest.java +++ b/test/org/traccar/ProtocolTest.java @@ -52,6 +52,14 @@ public class ProtocolTest extends BaseTest { return builder.toString(); } + protected ByteBuf concatenateBuffers(ByteBuf... buffers) { + ByteBuf result = Unpooled.buffer(); + for (ByteBuf buf : buffers) { + result.writeBytes(buf); + } + return result; + } + protected ByteBuf binary(String... data) { return Unpooled.wrappedBuffer(DataConverter.parseHex(concatenateStrings(data))); } |