com.fasterxml.jackson.databind.deser

Class DataFormatReaders.Match

    • Field Detail

      • _originalStream

        protected final InputStream _originalStream
      • _bufferedData

        protected final byte[] _bufferedData
        Content read during format matching process
      • _bufferedStart

        protected final int _bufferedStart
        Pointer to the first byte in buffer available for reading
      • _bufferedLength

        protected final int _bufferedLength
        Number of bytes available in buffer.
      • _match

        protected final ObjectReader _match
        Factory that produced sufficient match (if any)
    • Method Detail

      • hasMatch

        public boolean hasMatch()
        Accessor to use to see if any formats matched well enough with the input data.
      • getMatchedFormatName

        public String getMatchedFormatName()
        Accessor for getting brief textual name of matched format if any (null if none). Equivalent to:
           return hasMatch() ? getMatch().getFormatName() : null;
        
      • createParserWithMatch

        public JsonParser createParserWithMatch()
                                         throws IOException
        Convenience method for trying to construct a JsonParser for parsing content which is assumed to be in detected data format. If no match was found, returns null.
        Throws:
        IOException
      • getDataStream

        public InputStream getDataStream()
        Method to use for accessing input for which format detection has been done. This must be used instead of using stream passed to detector unless given stream itself can do buffering. Stream will return all content that was read during matching process, as well as remaining contents of the underlying stream.

Copyright © 2008–2018 FasterXML. All rights reserved.