public static WebSocketPacket tokenToPacket(Token aToken) {
WebSocketPacket lPacket = null;
try {
JSONObject lJSON = aToken.getJSONObject();
String lData = lJSON.toString();
lPacket = new RawPacket(lData, "UTF-8");
} catch (UnsupportedEncodingException ex) {
// TODO: process exception
// log.error(ex.getClass().getSimpleName() + ": " + ex.getMessage());
}
return lPacket;