Class PortUtil

java.lang.Object
com.itextpdf.styledxmlparser.PortUtil

public class PortUtil extends Object
This file is a helper class for internal usage only. Be aware that its API and functionality may be changed in the future.
  • Constructor Details

    • PortUtil

      private PortUtil()
      Instantiates a PortUtil instance.
  • Method Details

    • wrapInBufferedReader

      public static Reader wrapInBufferedReader(Reader inputStreamReader)
      Wraps a Reader instance in a BufferedReader.
      Parameters:
      inputStreamReader - the original reader
      Returns:
      the buffered reader
    • createRegexPatternWithDotMatchingNewlines

      public static Pattern createRegexPatternWithDotMatchingNewlines(String regex)
      By default "." symbol in regular expressions does not match line terminators. The issue is more complicated by the fact that "." does not match only "\n" in C#, while it does not match several other characters as well in Java. This utility method creates a pattern in which dots match any character, including line terminators
      Parameters:
      regex - regular expression string
      Returns:
      pattern in which dot characters match any Unicode char, including line terminators