Refactoring of CoAP. Started using StandardCharsets.UTF_8 to avoid need of catching encoding exceptions.