Minor, added ByteBuffer to string conversion debug Utils

This commit is contained in:
andrea
2013-11-27 18:44:42 +01:00
parent 3ce82c5150
commit e9adffec54
@@ -0,0 +1,17 @@
package org.dna.mqtt.moquette.messaging.spi.impl;
import java.nio.ByteBuffer;
/**
*
* @author andrea
*/
class DebugUtils {
static String payload2Str(ByteBuffer content) {
byte[] b = new byte[content.remaining()];
content.mark();
content.get(b);
content.reset();
return new String(b);
}
}