Class IDNInternetAddress

java.lang.Object
de.cuioss.tools.net.IDNInternetAddress

public class IDNInternetAddress extends Object
Author:
Matthias Walliczek
  • Constructor Details

  • Method Details

    • encode

      public static String encode(@NonNull @NonNull String completeAddress)
      Encode the domain part of an email address
      Parameters:
      completeAddress - the address to encode in RFC822 format
      Returns:
      the encoded address in RFC822 format
    • encode

      public static String encode(@NonNull @NonNull String completeAddress, UnaryOperator<String> sanitizer)
      Encodes the given address and sanitizes the elements with the provided sanitizer. It takes care on the special elements like <> by not trying to sanitize them.
      Parameters:
      completeAddress -
      sanitizer - to be passed as UnaryOperator
      Returns:
      the sanitized and encoded address.
    • decode

      public static String decode(@NonNull @NonNull String completeAddress)
      Decode the domain part of an email address
      Parameters:
      completeAddress - the address to decode in RFC822 format
      Returns:
      the decoded address in RFC822 format
    • decode

      public static String decode(@NonNull @NonNull String completeAddress, UnaryOperator<String> sanitizer)
      Decodes the given address and sanitizes the elements with the provided sanitizer. It takes care on the special elements like <> by not trying to sanitize them.
      Parameters:
      completeAddress -
      sanitizer - to be passed as UnaryOperator
      Returns:
      the sanitized and decoded address.