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