Class DataFormatMatcher

  • public class DataFormatMatcher
    extends java.lang.Object
    Result object constructed by DataFormatDetector when requested to detect format of given input data.
    • Method Detail

      • hasMatch

        public boolean hasMatch()
        Accessor to use to see if any formats matched well enough with the input data.
        Whether format has a match
      • getMatch

        public JsonFactory getMatch()
        Accessor for JsonFactory that represents format that data matched.
        Relevant JsonFactory to indicate matched format
      • getMatchedFormatName

        public java.lang.String getMatchedFormatName()
        Accessor for getting brief textual name of matched format if any (null if none). Equivalent to:
           return hasMatch() ? getMatch().getFormatName() : null;
        Name of the format that is acceptable match, if any; null if none
      • createParserWithMatch

        public JsonParser createParserWithMatch()
      • getDataStream

        public 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.
        InputStream to use for reading actual content using format detected