Interface Parser
- All Known Implementing Classes:
JsonParser, XmlParser
public interface Parser
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisValid(byte[] bomBytes) Verifies a CycloneDX BOM conforms to the latest version of the specification.booleanVerifies a CycloneDX BOM conforms to the specified specification version.booleanVerifies a CycloneDX BOM conforms to the latest version of the specification.booleanVerifies a CycloneDX BOM conforms to the specified specification version.booleanisValid(InputStream inputStream) Verifies a CycloneDX BOM conforms to the latest version of the specification.booleanisValid(InputStream inputStream, Version schemaVersion) Verifies a CycloneDX BOM conforms to the specified specification version.booleanVerifies a CycloneDX BOM conforms to the latest version of the specification.booleanVerifies a CycloneDX BOM conforms to the specified specification version.parse(byte[] bomBytes) Parses a CycloneDX BOM.Parses a CycloneDX BOM.parse(InputStream inputStream) Parses a CycloneDX BOM.Parses a CycloneDX BOM.validate(byte[] bomBytes) Validates a CycloneDX BOM.Validates a CycloneDX BOM conforms to a specific specification version.Validates a CycloneDX BOM.Validates a CycloneDX BOM conforms to a specific specification version.validate(InputStream inputStream) Validates a CycloneDX BOM.validate(InputStream inputStream, Version schemaVersion) Validates a CycloneDX BOM conforms to a specific specification version.Validates a CycloneDX BOM.Validates a CycloneDX BOM conforms to a specific specification version.
-
Method Details
-
parse
Parses a CycloneDX BOM.- Parameters:
file- a File to parse- Returns:
- a Bom object
- Throws:
ParseException- when errors are encountered- Since:
- 3.0.0
-
parse
Parses a CycloneDX BOM.- Parameters:
bomBytes- the byte array to parse- Returns:
- a Bom object
- Throws:
ParseException- when errors are encountered- Since:
- 3.0.0
-
parse
Parses a CycloneDX BOM.- Parameters:
reader- the Reader from which to parse- Returns:
- a Bom object
- Throws:
ParseException- when errors are encountered- Since:
- 3.0.0
-
parse
Parses a CycloneDX BOM.- Parameters:
inputStream- the InputStream from which to parse- Returns:
- a Bom object
- Throws:
ParseException- when errors are encountered- Since:
- 3.0.0
-
validate
Validates a CycloneDX BOM.- Parameters:
file- the CycloneDX BOM file to validate- Returns:
- a List of ParseException. If the size of the list is 0, validation was successful
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
validate
Validates a CycloneDX BOM conforms to a specific specification version.- Parameters:
file- the CycloneDX BOM file to validateschemaVersion- the schema version to validate against- Returns:
- a List of ParseException. If the size of the list is 0, validation was successful
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
validate
Validates a CycloneDX BOM.- Parameters:
bomBytes- the byte array to validate- Returns:
- a List of ParseException. If the size of the list is 0, validation was successful
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
validate
Validates a CycloneDX BOM conforms to a specific specification version.- Parameters:
bomBytes- the byte array to validateschemaVersion- the schema version to validate against- Returns:
- a List of ParseException. If the size of the list is 0, validation was successful
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
validate
Validates a CycloneDX BOM.- Parameters:
reader- the Reader from which to parse- Returns:
- a List of ParseException. If the size of the list is 0, validation was successful
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
validate
Validates a CycloneDX BOM conforms to a specific specification version.- Parameters:
reader- the Reader from which to parseschemaVersion- the schema version to validate against- Returns:
- a List of ParseException. If the size of the list is 0, validation was successful
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
validate
Validates a CycloneDX BOM.- Parameters:
inputStream- the InputStream from which to validate- Returns:
- a List of ParseException. If the size of the list is 0, validation was successful
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
validate
Validates a CycloneDX BOM conforms to a specific specification version.- Parameters:
inputStream- the InputStream from which to validateschemaVersion- the schema version to validate against- Returns:
- a List of ParseException. If the size of the list is 0, validation was successful
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
isValid
Verifies a CycloneDX BOM conforms to the latest version of the specification.- Parameters:
file- the CycloneDX BOM file to validate- Returns:
- true if the file is a valid BOM, false if not
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
isValid
Verifies a CycloneDX BOM conforms to the specified specification version.- Parameters:
file- the CycloneDX BOM file to validateschemaVersion- the schema version to validate against- Returns:
- true if the file is a valid BOM, false if not
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
isValid
Verifies a CycloneDX BOM conforms to the latest version of the specification.- Parameters:
bomBytes- the byte array to validate- Returns:
- true if the file is a valid BOM, false if not
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
isValid
Verifies a CycloneDX BOM conforms to the specified specification version.- Parameters:
bomBytes- the byte array to validateschemaVersion- the schema version to validate against- Returns:
- true if the file is a valid BOM, false if not
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
isValid
Verifies a CycloneDX BOM conforms to the latest version of the specification.- Parameters:
reader- the Reader from which to validate- Returns:
- true if the file is a valid BOM, false if not
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
isValid
Verifies a CycloneDX BOM conforms to the specified specification version.- Parameters:
reader- the Reader from which to validateschemaVersion- the schema version to validate against- Returns:
- true if the file is a valid BOM, false if not
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
isValid
Verifies a CycloneDX BOM conforms to the latest version of the specification.- Parameters:
inputStream- the InputStream from which to validate- Returns:
- true if the file is a valid BOM, false if not
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-
isValid
Verifies a CycloneDX BOM conforms to the specified specification version.- Parameters:
inputStream- the InputStream from which to validateschemaVersion- the schema version to validate against- Returns:
- true if the file is a valid BOM, false if not
- Throws:
IOException- when errors are encountered- Since:
- 3.0.0
-