Package com.itextpdf.styledxmlparser
Class PortUtil
- java.lang.Object
-
- com.itextpdf.styledxmlparser.PortUtil
-
public class PortUtil extends java.lang.Object
This file is a helper class for internal usage only. Be aware that its API and functionality may be changed in the future.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.regex.Pattern
createRegexPatternWithDotMatchingNewlines(java.lang.String regex)
By default "." symbol in regular expressions does not match line terminators.static java.io.Reader
wrapInBufferedReader(java.io.Reader inputStreamReader)
Wraps aReader
instance in aBufferedReader
.
-
-
-
Constructor Detail
-
PortUtil
private PortUtil()
Instantiates aPortUtil
instance.
-
-
Method Detail
-
wrapInBufferedReader
public static java.io.Reader wrapInBufferedReader(java.io.Reader inputStreamReader)
Wraps aReader
instance in aBufferedReader
.- Parameters:
inputStreamReader
- the original reader- Returns:
- the buffered reader
-
createRegexPatternWithDotMatchingNewlines
public static java.util.regex.Pattern createRegexPatternWithDotMatchingNewlines(java.lang.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
-
-