Class Decoder

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class Decoder
    extends java.lang.Object
    implements java.io.Closeable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) JSONCodec codec  
      (package private) int current  
      (package private) java.security.MessageDigest digest  
      (package private) java.nio.charset.Charset encoding  
      (package private) java.util.Map<java.lang.String,​java.lang.Object> extra  
      (package private) boolean inflate  
      (package private) boolean keepOpen  
      (package private) java.io.Reader reader  
      (package private) boolean strict  
    • Constructor Summary

      Constructors 
      Constructor Description
      Decoder​(JSONCodec codec)  
    • Field Detail

      • reader

        java.io.Reader reader
      • current

        int current
      • digest

        java.security.MessageDigest digest
      • extra

        java.util.Map<java.lang.String,​java.lang.Object> extra
      • encoding

        java.nio.charset.Charset encoding
      • strict

        boolean strict
      • inflate

        boolean inflate
      • keepOpen

        boolean keepOpen
    • Constructor Detail

    • Method Detail

      • from

        public Decoder from​(java.io.File file)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • from

        public Decoder from​(java.io.InputStream in)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • from

        public Decoder from​(byte[] data)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • charset

        public Decoder charset​(java.lang.String encoding)
      • charset

        public Decoder charset​(java.nio.charset.Charset encoding)
      • from

        public Decoder from​(java.io.Reader in)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • faq

        public Decoder faq​(java.lang.String in)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • from

        public Decoder from​(java.lang.String in)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • mark

        public Decoder mark()
                     throws java.security.NoSuchAlgorithmException
        Throws:
        java.security.NoSuchAlgorithmException
      • digest

        public byte[] digest()
      • get

        public <T> T get​(java.lang.Class<T> clazz)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • get

        public java.lang.Object get​(java.lang.reflect.Type type)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • get

        public java.lang.Object get()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • get

        public <T> T get​(TypeReference<T> ref)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • keepOpen

        public Decoder keepOpen()
      • read

        int read()
          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • current

        int current()
      • skipWs

        int skipWs()
            throws java.lang.Exception
        Skip any whitespace.
        Throws:
        java.lang.Exception
      • next

        int next()
          throws java.lang.Exception
        Skip any whitespace.
        Throws:
        java.lang.Exception
      • expect

        void expect​(java.lang.String s)
             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isEof

        public boolean isEof()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • getExtra

        public java.util.Map<java.lang.String,​java.lang.Object> getExtra()
      • inflate

        public Decoder inflate()