dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/message/codec/PlainTextCodec.java [47:62]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void encode(OutputStream os, Object data, Charset charset) throws EncodeException {
        if (data == null) {
            return;
        }
        try {
            if (data instanceof CharSequence) {
                os.write((data.toString()).getBytes(charset));
                return;
            }
            os.write(httpJsonUtils.toJson(data).getBytes(charset));
        } catch (HttpStatusException e) {
            throw e;
        } catch (Throwable t) {
            throw new EncodeException("Error encoding plain text", t);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/message/codec/HtmlCodec.java [47:62]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void encode(OutputStream os, Object data, Charset charset) throws EncodeException {
        if (data == null) {
            return;
        }
        try {
            if (data instanceof CharSequence) {
                os.write((data.toString()).getBytes(charset));
                return;
            }
            os.write(httpJsonUtils.toJson(data).getBytes(charset));
        } catch (HttpStatusException e) {
            throw e;
        } catch (Throwable t) {
            throw new EncodeException("Error encoding html", t);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



