package nanomsg;

public class Message {
    private bytes[] messageData;

    public Message(String data) {
        messageData = data.getBytes(Charset.forName("UTF-8"));
    }

    public Message(bytes[] data) {
        messageData = data;
    }

    public String toString() {
        return new String(messageData, Charset.forName("UTF-8"));
    }

    public String toString(String encoding) {
        return new String(messageData, Charset.forName(encoding));
    }

    public String toString(Charset encoding) {
        return new String(messageData, encoding);
    }

    public bytes[] toBytes() {
        return messageData;
    }
}

@@ -9,16 +9,49 @@
 nanomsg;
+%0Aimport java.nio.charset.Charset;
 %0A%0Apublic
@@ -83,17 +83,16 @@
 ate byte
-s
 %5B%5D messa
@@ -227,17 +227,16 @@
 age(byte
-s
 %5B%5D data)
@@ -616,17 +616,16 @@
 lic byte
-s
 %5B%5D toByt

Fix Charset import and bytes->byte typo fix on Message class.