Class ModelDetector
- java.lang.Object
-
- gov.nist.secauto.metaschema.databind.io.ModelDetector
-
public class ModelDetector extends Object
Provides a means to analyze content to determine what type of bound data it contains.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModelDetector.Result
-
Constructor Summary
Constructors Constructor Description ModelDetector(IBindingContext bindingContext)
Construct a new format detector using the default configuration.ModelDetector(IBindingContext bindingContext, IConfiguration<DeserializationFeature<?>> configuration)
Construct a new format detector using the providedconfiguration
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelDetector.Result
detect(InputStream inputStream, Format format)
Analyzes the data from the providedinputStream
to determine it's model.
-
-
-
Constructor Detail
-
ModelDetector
public ModelDetector(@NonNull IBindingContext bindingContext)
Construct a new format detector using the default configuration.- Parameters:
bindingContext
- information about how Java classes are bound to Module definitions
-
ModelDetector
public ModelDetector(@NonNull IBindingContext bindingContext, @NonNull IConfiguration<DeserializationFeature<?>> configuration)
Construct a new format detector using the providedconfiguration
.- Parameters:
bindingContext
- information about how Java classes are bound to Module definitionsconfiguration
- the deserialization configuration
-
-
Method Detail
-
detect
@NonNull public ModelDetector.Result detect(@NonNull InputStream inputStream, @NonNull Format format) throws IOException
Analyzes the data from the providedinputStream
to determine it's model.- Parameters:
inputStream
- the resource stream to analyzeformat
- the expected format of the data to read- Returns:
- the analysis result
- Throws:
IOException
- if an error occurred while reading the resource
-
-