Class EncodeUtil

java.lang.Object
com.vaadin.flow.internal.EncodeUtil

public final class EncodeUtil extends Object
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 Details

    • rfc5987Encode

      public static String rfc5987Encode(String value)
      Encodes the given string to UTF-8 value-chars as defined in RFC5987 for use in e.g. the Content-Disposition HTTP header.
      Parameters:
      value - the string to encode, not null
      Returns:
      the encoded string
    • rfc2047Encode

      public static String rfc2047Encode(String value)
      Encodes the given header field param as defined in RFC 2047 for use in e.g. the Content-Disposition HTTP header.
      Parameters:
      value - the string to encode, not null
      Returns:
      the encoded string
    • isPureUSASCII

      public static boolean isPureUSASCII(String text)
      Checks if the given string contains only US-ASCII characters.
      Parameters:
      text - the string to check, not null
      Returns:
      true if the string contains only US-ASCII characters,