Package com.ongres.stringprep
Interface Profile
-
public interface Profile
TheProfile
interface is used to define stringprep profiles in order to fully specify the processing options.Stringprep profiles can also exclude characters that should not normally appear in text that is used in the protocol. The profile can prevent such characters by changing the characters to be excluded to other characters, by removing those characters, or by causing an error if the characters would appear in the output.
- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int[]
additionalMappingTable(int codePoint)
Any additional mapping tables specific to the profile.default char[]
prepareQuery(char[] string)
"Queries" are strings that are used to match against strings that are stored identifiers, such as user-entered names for digital certificate authorities and DNS lookups.default java.lang.String
prepareQuery(java.lang.String string)
"Queries" are strings that are used to match against strings that are stored identifiers, such as user-entered names for digital certificate authorities and DNS lookups.default char[]
prepareStored(char[] string)
"Stored strings" are strings that are used in protocol identifiers and named entities, such as names in digital certificates and DNS domain name parts.default java.lang.String
prepareStored(java.lang.String string)
"Stored strings" are strings that are used in protocol identifiers and named entities, such as names in digital certificates and DNS domain name parts.java.util.Set<Option>
profile()
Set of options used by the profile.default boolean
prohibitedAdditionalCharacters(int codePoint)
Any additional characters that are prohibited as output specific to the profile.
-
-
-
Method Detail
-
profile
java.util.Set<Option> profile()
Set of options used by the profile.- Returns:
- profile options.
-
prepareQuery
default char[] prepareQuery(char[] string)
"Queries" are strings that are used to match against strings that are stored identifiers, such as user-entered names for digital certificate authorities and DNS lookups.- Parameters:
string
- to prepare based on a "stringprep" profile.- Returns:
- The prepared String.
- Throws:
java.lang.IllegalArgumentException
- if there is a prohibited output.- Since:
- 2.1
-
prepareQuery
default java.lang.String prepareQuery(java.lang.String string)
"Queries" are strings that are used to match against strings that are stored identifiers, such as user-entered names for digital certificate authorities and DNS lookups.- Parameters:
string
- to prepare based on a "stringprep" profile.- Returns:
- The prepared String.
- Throws:
java.lang.IllegalArgumentException
- if there is a prohibited output.
-
prepareStored
default char[] prepareStored(char[] string)
"Stored strings" are strings that are used in protocol identifiers and named entities, such as names in digital certificates and DNS domain name parts.- Parameters:
string
- to prepare based on a "stringprep" profile.- Returns:
- The prepared String.
- Throws:
java.lang.IllegalArgumentException
- if there is a prohibited output.- Since:
- 2.1
-
prepareStored
default java.lang.String prepareStored(java.lang.String string)
"Stored strings" are strings that are used in protocol identifiers and named entities, such as names in digital certificates and DNS domain name parts.- Parameters:
string
- to prepare based on a "stringprep" profile.- Returns:
- The prepared String.
- Throws:
java.lang.IllegalArgumentException
- if there is a prohibited output.
-
additionalMappingTable
default int[] additionalMappingTable(int codePoint)
Any additional mapping tables specific to the profile.- Parameters:
codePoint
- the character (Unicode code point) to be mapped.- Returns:
- Mapping with the int[] array or with the same codePoint.
-
prohibitedAdditionalCharacters
default boolean prohibitedAdditionalCharacters(int codePoint)
Any additional characters that are prohibited as output specific to the profile.- Parameters:
codePoint
- the character (Unicode code point) to be tested.- Returns:
true
if the givencodePoint
is prohibited on this profile.
-
-