StringBuilder result = new StringBuilder();
if (packets.size() == 1) {
IPacket p = packets.get(0);
if (p instanceof Packet) {
result.append(PacketEncoder.encodePacket((Packet) packets
<BUG>.get(0)));
}</BUG>
} else {
for (IPacket p : packets) {
if (p instanceof Packet) {

StringBuilder result = new StringBuilder();
if (packets.size() == 1) {
IPacket p = packets.get(0);
if (p instanceof Packet) {
result.append(PacketEncoder.encodePacket((Packet) packets
.get(0)).toString(CharsetUtil.UTF_8));
}
} else {
for (IPacket p : packets) {
if (p instanceof Packet) {
