Class CompessorMapper

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addComma()  
      void addValue​(java.lang.Object current, java.lang.Object value)
      add a value in an array json object.
      private void close​(java.lang.Object obj)  
      CompessorMapper convert​(java.lang.Object current)
      Allow a mapper to converte a temprary structure to the final data format.
      java.lang.Object createArray()
      use to instantiate a new object that will be used as an array
      java.lang.Object createObject()
      use to instantiate a new object that will be used as an object
      private boolean isArray()  
      private boolean isCompressor​(java.lang.Object obj)  
      private boolean isObject()  
      private void open​(java.lang.Object obj)  
      void setValue​(java.lang.Object current, java.lang.String key, java.lang.Object value)
      called when json-smart done parsing a value
      JsonReaderI<?> startArray​(java.lang.String key)
      called when json-smart parser start an array.
      private void startKey​(java.lang.String key)  
      JsonReaderI<?> startObject​(java.lang.String key)
      called when json-smart parser meet an object key
      private void writeValue​(java.lang.Object value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • out

        private java.lang.Appendable out
      • _isObj

        private java.lang.Boolean _isObj
      • needSep

        private boolean needSep
      • isOpen

        private boolean isOpen
      • isClosed

        private boolean isClosed
    • Constructor Detail

      • CompessorMapper

        public CompessorMapper​(JsonReader base,
                               java.lang.Appendable out,
                               JSONStyle compression)
      • CompessorMapper

        public CompessorMapper​(JsonReader base,
                               java.lang.Appendable out,
                               JSONStyle compression,
                               java.lang.Boolean isObj)
    • Method Detail

      • isArray

        private boolean isArray()
      • isObject

        private boolean isObject()
      • isCompressor

        private boolean isCompressor​(java.lang.Object obj)
      • startArray

        public JsonReaderI<?> startArray​(java.lang.String key)
                                  throws java.io.IOException
        Description copied from class: JsonReaderI
        called when json-smart parser start an array.
        Overrides:
        startArray in class JsonReaderI<CompessorMapper>
        Parameters:
        key - the destination key name, or null.
        Throws:
        java.io.IOException
      • startKey

        private void startKey​(java.lang.String key)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • setValue

        public void setValue​(java.lang.Object current,
                             java.lang.String key,
                             java.lang.Object value)
                      throws java.io.IOException
        Description copied from class: JsonReaderI
        called when json-smart done parsing a value
        Overrides:
        setValue in class JsonReaderI<CompessorMapper>
        Throws:
        java.io.IOException
      • addValue

        public void addValue​(java.lang.Object current,
                             java.lang.Object value)
                      throws java.io.IOException
        Description copied from class: JsonReaderI
        add a value in an array json object.
        Overrides:
        addValue in class JsonReaderI<CompessorMapper>
        Throws:
        java.io.IOException
      • addComma

        private void addComma()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • writeValue

        private void writeValue​(java.lang.Object value)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        private void close​(java.lang.Object obj)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • open

        private void open​(java.lang.Object obj)
                   throws java.io.IOException
        Throws:
        java.io.IOException