mantis-remote-observable/src/main/java/io/reactivex/netty/codec/Codecs.java [60:78]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static Codec<String> stringAscii() {

        final Charset charset = Charset.forName("US-ASCII");

        return new Codec<String>() {
            @Override
            public String decode(byte[] bytes) {
                return new String(bytes, charset);
            }

            @Override
            public byte[] encode(final String value) {
                final byte[] bytes = new byte[value.length()];
                for (int i = 0; i < value.length(); i++)
                    bytes[i] = (byte) value.charAt(i);
                return bytes;
            }
        };
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



mantis-common/src/main/java/io/mantisrx/common/codec/Codecs.java [79:97]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static Codec<String> stringAscii() {

        final Charset charset = Charset.forName("US-ASCII");

        return new Codec<String>() {
            @Override
            public String decode(byte[] bytes) {
                return new String(bytes, charset);
            }

            @Override
            public byte[] encode(final String value) {
                final byte[] bytes = new byte[value.length()];
                for (int i = 0; i < value.length(); i++)
                    bytes[i] = (byte) value.charAt(i);
                return bytes;
            }
        };
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



