public void writeHex(byte[] bytes) {
        int newcount = count + bytes.length * 2 + 3;
        if (newcount > buf.length) {
            expandCapacity(newcount);
        }

        buf[count++] = 'x';
        buf[count++] = '\'';

        for (int i = 0; i < bytes.length; ++i) {
            byte b = bytes[i];

            int a = b & 0xFF;
            int b0 = a >> 4;
            int b1 = a & 0xf;

            buf[count++] = (char) (b0 + (b0 < 10 ? 48 : 55));
            buf[count++] = (char) (b1 + (b1 < 10 ? 48 : 55));
        }
        buf[count++] = '\'';
    }
Close the stream. This method does not release the buffer, since its contents might still be required. Note:
Invoking this method in this class will have no effect.
src/main/java/com/alibaba/fastjson/serializer/SerializeWriter.java