Package com.vaadin.flow.internal
Class EncodeUtil
java.lang.Object
com.vaadin.flow.internal.EncodeUtil
Utilities related to various encoding schemes.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isPureUSASCII
(String text) Checks if the given string contains only US-ASCII characters.static String
rfc2047Encode
(String value) Encodes the given header field param as defined in RFC 2047 for use in e.g.static String
rfc5987Encode
(String value) Encodes the given string to UTF-8value-chars
as defined in RFC5987 for use in e.g.
-
Method Details
-
rfc5987Encode
Encodes the given string to UTF-8value-chars
as defined in RFC5987 for use in e.g. theContent-Disposition
HTTP header.- Parameters:
value
- the string to encode, notnull
- Returns:
- the encoded string
-
rfc2047Encode
Encodes the given header field param as defined in RFC 2047 for use in e.g. theContent-Disposition
HTTP header.- Parameters:
value
- the string to encode, notnull
- Returns:
- the encoded string
-
isPureUSASCII
Checks if the given string contains only US-ASCII characters.- Parameters:
text
- the string to check, notnull
- Returns:
true
if the string contains only US-ASCII characters,
-