- All Implemented Interfaces:
ValidMediaFilter,ValidMediaInput,ValidMediaOutput,Encoder
EncodingContext.encodeURL(java.lang.String) to
rewrite the URL as needed.- Author:
- AO Industries, Inc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSkipValidation(MediaType outputType) Checks if validation may be skipped when the characters being written to this validator is already known to be valid with the given media type.Gets the input type.Gets the output type.booleanisValidatingMediaInputType(MediaType inputType) Checks if this is validating the provided type, which allows one validator to be substituted in place of another.protected voidwriteSuffix(CharSequence buffer, Appendable out) Methods inherited from class com.aoapps.encoding.BufferedEncoder
append, append, append, isBuffered, write, write, write, write, write, writeSuffixToMethods inherited from class com.aoapps.encoding.MediaEncoder
getInstance, writePrefixTo, writeSuffixTo
-
Constructor Details
-
UrlInXhtmlAttributeEncoder
-
-
Method Details
-
getValidMediaInputType
Description copied from interface:ValidMediaInputGets the input type. -
isValidatingMediaInputType
Description copied from interface:ValidMediaInputChecks if this is validating the provided type, which allows one validator to be substituted in place of another. This is acceptable when this validator is equal to, or more strict, than the giveninputType.Please note that this validator only needs to block invalid characters for
inputType. This validator does not need to let through all characters, just block the invalid. This is a one-way optimization.This is almost the inverse operation of
ValidMediaInput.isValidatingMediaInputType(com.aoapps.encoding.MediaType), with the exception of characters only invalid due to nested encodings.- Returns:
truewhen this validator will throw exceptions on all invalid characters from the giveninputType- See Also:
-
canSkipValidation
Description copied from interface:ValidMediaInputChecks if validation may be skipped when the characters being written to this validator is already known to be valid with the given media type. This may be done when every valid character for the given media type is also valid within this validator.This is almost the inverse operation of
ValidMediaInput.isValidatingMediaInputType(com.aoapps.encoding.MediaType), with the exception of characters only invalid due to nested encodings.- Returns:
truewhen all valid characters of the givenoutputTypeare also valid on this validator- See Also:
-
getValidMediaOutputType
Description copied from interface:ValidMediaOutputGets the output type. -
writeSuffix
- Specified by:
writeSuffixin classBufferedEncoder- Throws:
IOException
-
