Class MessageUtil

java.lang.Object
org.krysalis.barcode4j.tools.MessageUtil

public class MessageUtil extends Object
Utilities for pre-processing messages.
  • Constructor Details

    • MessageUtil

      public MessageUtil()
  • Method Details

    • unescapeUnicode

      public static String unescapeUnicode(String message)
      Un-escapes escaped Unicode characters in a message. This is used to support characters not encodable in XML, such as the RS or GS characters.
      Parameters:
      message - the message
      Returns:
      the processed message
    • filterNonPrintableCharacters

      public static String filterNonPrintableCharacters(String text)
      Filters non-printable ASCII characters (0-31 and 127) from a string with spaces and returns that. Please note that non-printable characters outside the ASCII character set are not touched by this method.
      Parameters:
      text - the text to be filtered.
      Returns:
      the filtered text