public final class CpeParser extends Object
| Modifier and Type | Method and Description |
|---|---|
static Cpe |
parse(String cpeString)
Parses a CPE String into an object; the string can be formated as either
a CPE 2.2 URI or CPE 2.3 Formatted String.
|
static Cpe |
parse(String cpeString,
boolean lenient)
Parses a CPE String into an object with the option of parsing CPE 2.2 URI
strings in lenient mode - allowing for CPE values that do not adhere to
the specification.
|
protected static Cpe |
parse22(String cpeString)
Parses a CPE 2.2 URI.
|
protected static Cpe |
parse22(String cpeString,
boolean lenient)
Parses a CPE 2.2 URI.
|
protected static Cpe |
parse23(String cpeString)
Parses a CPE 2.3 Formatted String.
|
protected static Cpe |
parse23(String cpeString,
boolean lenient)
Parses a CPE 2.3 Formatted String.
|
protected static void |
unpackEdition(String edition,
CpeBuilder cb,
boolean lenient)
In a CPE 2.2 URI the new fields from CPE 2.3 may be "packed" into the
edition field.
|
public static Cpe parse(String cpeString) throws CpeParsingException
cpeString - the CPE string to parseCpeParsingException - thrown if the cpeString is invalidpublic static Cpe parse(String cpeString, boolean lenient) throws CpeParsingException
cpeString - the CPE string to parselenient - when true the CPE 2.2 parser will put in
lenient mode attempting to parse invalid CPE URI values.CpeParsingException - thrown if the cpeString is invalidprotected static Cpe parse22(String cpeString) throws CpeParsingException
cpeString - the CPE string to parseCpeParsingException - thrown if the cpeString is invalidprotected static Cpe parse22(String cpeString, boolean lenient) throws CpeParsingException
cpeString - the CPE string to parselenient - when true the parser will put in lenient mode
attempting to parse invalid CPE values.CpeParsingException - thrown if the cpeString is invalidprotected static void unpackEdition(String edition, CpeBuilder cb, boolean lenient) throws CpeParsingException
edition - the edition string to unpackcb - a reference to the CPE Builder to unpack the edition intolenient - whether or not to use lenient parsingCpeParsingException - thrown if the edition value is invalidprotected static Cpe parse23(String cpeString) throws CpeParsingException
cpeString - the CPE string to parseCpeParsingException - thrown if the cpeString is invalidprotected static Cpe parse23(String cpeString, boolean lenient) throws CpeParsingException
cpeString - the CPE string to parselenient - when true the parser will put in lenient mode
attempting to parse invalid CPE values.CpeParsingException - thrown if the cpeString is invalidCopyright © 2018–2023. All rights reserved.