Class JsonStringFormatter

  • All Implemented Interfaces:
    com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter

    public class JsonStringFormatter
    extends Object
    implements com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
    Copied from mysql-binlog-connector-java 0.27.2 to add whitespace before value and after comma.

    Line 105: Added whitespace before value, Line 213: Added whitespace after comma

    • Constructor Detail

      • JsonStringFormatter

        public JsonStringFormatter()
    • Method Detail

      • getString

        public String getString()
      • beginObject

        public void beginObject​(int numElements)
        Specified by:
        beginObject in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • beginArray

        public void beginArray​(int numElements)
        Specified by:
        beginArray in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • endObject

        public void endObject()
        Specified by:
        endObject in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • endArray

        public void endArray()
        Specified by:
        endArray in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • name

        public void name​(String name)
        Specified by:
        name in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • value

        public void value​(String value)
        Specified by:
        value in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • value

        public void value​(int value)
        Specified by:
        value in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • value

        public void value​(long value)
        Specified by:
        value in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • value

        public void value​(double value)
        Specified by:
        value in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • value

        public void value​(BigInteger value)
        Specified by:
        value in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • value

        public void value​(BigDecimal value)
        Specified by:
        value in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • value

        public void value​(boolean value)
        Specified by:
        value in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • valueNull

        public void valueNull()
        Specified by:
        valueNull in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • valueYear

        public void valueYear​(int year)
        Specified by:
        valueYear in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • valueDate

        public void valueDate​(int year,
                              int month,
                              int day)
        Specified by:
        valueDate in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • valueDatetime

        public void valueDatetime​(int year,
                                  int month,
                                  int day,
                                  int hour,
                                  int min,
                                  int sec,
                                  int microSeconds)
        Specified by:
        valueDatetime in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • valueTime

        public void valueTime​(int hour,
                              int min,
                              int sec,
                              int microSeconds)
        Specified by:
        valueTime in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • valueTimestamp

        public void valueTimestamp​(long secondsPastEpoch,
                                   int microSeconds)
        Specified by:
        valueTimestamp in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • valueOpaque

        public void valueOpaque​(ColumnType type,
                                byte[] value)
        Specified by:
        valueOpaque in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • nextEntry

        public void nextEntry()
        Specified by:
        nextEntry in interface com.github.shyiko.mysql.binlog.event.deserialization.json.JsonFormatter
      • appendString

        protected void appendString​(String original)
        Append a string by escaping any characters that must be escaped.
        Parameters:
        original - the string to be written; may not be null
      • appendTwoDigitUnsignedInt

        protected void appendTwoDigitUnsignedInt​(int value)
      • appendFourDigitUnsignedInt

        protected void appendFourDigitUnsignedInt​(int value)
      • appendSixDigitUnsignedInt

        protected void appendSixDigitUnsignedInt​(int value,
                                                 boolean trimTrailingZeros)
      • appendDate

        protected void appendDate​(int year,
                                  int month,
                                  int day)
      • appendTime

        protected void appendTime​(int hour,
                                  int min,
                                  int sec,
                                  int microSeconds)