public interface Parser
Modifier and Type | Method and Description |
---|---|
boolean |
isValid(byte[] bomBytes)
Verifies a CycloneDX BOM conforms to the latest version of the specification.
|
boolean |
isValid(byte[] bomBytes,
Version schemaVersion)
Verifies a CycloneDX BOM conforms to the specified specification version.
|
boolean |
isValid(File file)
Verifies a CycloneDX BOM conforms to the latest version of the specification.
|
boolean |
isValid(File file,
Version schemaVersion)
Verifies a CycloneDX BOM conforms to the specified specification version.
|
boolean |
isValid(InputStream inputStream)
Verifies a CycloneDX BOM conforms to the latest version of the specification.
|
boolean |
isValid(InputStream inputStream,
Version schemaVersion)
Verifies a CycloneDX BOM conforms to the specified specification version.
|
boolean |
isValid(Reader reader)
Verifies a CycloneDX BOM conforms to the latest version of the specification.
|
boolean |
isValid(Reader reader,
Version schemaVersion)
Verifies a CycloneDX BOM conforms to the specified specification version.
|
Bom |
parse(byte[] bomBytes)
Parses a CycloneDX BOM.
|
Bom |
parse(File file)
Parses a CycloneDX BOM.
|
Bom |
parse(InputStream inputStream)
Parses a CycloneDX BOM.
|
Bom |
parse(Reader reader)
Parses a CycloneDX BOM.
|
List<ParseException> |
validate(byte[] bomBytes)
Validates a CycloneDX BOM.
|
List<ParseException> |
validate(byte[] bomBytes,
Version schemaVersion)
Validates a CycloneDX BOM conforms to a specific specification version.
|
List<ParseException> |
validate(File file)
Validates a CycloneDX BOM.
|
List<ParseException> |
validate(File file,
Version schemaVersion)
Validates a CycloneDX BOM conforms to a specific specification version.
|
List<ParseException> |
validate(InputStream inputStream)
Validates a CycloneDX BOM.
|
List<ParseException> |
validate(InputStream inputStream,
Version schemaVersion)
Validates a CycloneDX BOM conforms to a specific specification version.
|
List<ParseException> |
validate(Reader reader)
Validates a CycloneDX BOM.
|
List<ParseException> |
validate(Reader reader,
Version schemaVersion)
Validates a CycloneDX BOM conforms to a specific specification version.
|
Bom parse(File file) throws ParseException
file
- a File to parseParseException
- when errors are encounteredBom parse(byte[] bomBytes) throws ParseException
bomBytes
- the byte array to parseParseException
- when errors are encounteredBom parse(Reader reader) throws ParseException
reader
- the Reader from which to parseParseException
- when errors are encounteredBom parse(InputStream inputStream) throws ParseException
inputStream
- the InputStream from which to parseParseException
- when errors are encounteredList<ParseException> validate(File file) throws IOException
file
- the CycloneDX BOM file to validateIOException
- when errors are encounteredList<ParseException> validate(File file, Version schemaVersion) throws IOException
file
- the CycloneDX BOM file to validateschemaVersion
- the schema version to validate againstIOException
- when errors are encounteredList<ParseException> validate(byte[] bomBytes) throws IOException
bomBytes
- the byte array to validateIOException
- when errors are encounteredList<ParseException> validate(byte[] bomBytes, Version schemaVersion) throws IOException
bomBytes
- the byte array to validateschemaVersion
- the schema version to validate againstIOException
- when errors are encounteredList<ParseException> validate(Reader reader) throws IOException
reader
- the Reader from which to parseIOException
- when errors are encounteredList<ParseException> validate(Reader reader, Version schemaVersion) throws IOException
reader
- the Reader from which to parseschemaVersion
- the schema version to validate againstIOException
- when errors are encounteredList<ParseException> validate(InputStream inputStream) throws IOException
inputStream
- the InputStream from which to validateIOException
- when errors are encounteredList<ParseException> validate(InputStream inputStream, Version schemaVersion) throws IOException
inputStream
- the InputStream from which to validateschemaVersion
- the schema version to validate againstIOException
- when errors are encounteredboolean isValid(File file) throws IOException
file
- the CycloneDX BOM file to validateIOException
- when errors are encounteredboolean isValid(File file, Version schemaVersion) throws IOException
file
- the CycloneDX BOM file to validateschemaVersion
- the schema version to validate againstIOException
- when errors are encounteredboolean isValid(byte[] bomBytes) throws IOException
bomBytes
- the byte array to validateIOException
- when errors are encounteredboolean isValid(byte[] bomBytes, Version schemaVersion) throws IOException
bomBytes
- the byte array to validateschemaVersion
- the schema version to validate againstIOException
- when errors are encounteredboolean isValid(Reader reader) throws IOException
reader
- the Reader from which to validateIOException
- when errors are encounteredboolean isValid(Reader reader, Version schemaVersion) throws IOException
reader
- the Reader from which to validateschemaVersion
- the schema version to validate againstIOException
- when errors are encounteredboolean isValid(InputStream inputStream) throws IOException
inputStream
- the InputStream from which to validateIOException
- when errors are encounteredboolean isValid(InputStream inputStream, Version schemaVersion) throws IOException
inputStream
- the InputStream from which to validateschemaVersion
- the schema version to validate againstIOException
- when errors are encounteredCopyright © 2017–2025 OWASP Foundation. All rights reserved.