Class NoDuplicatesResourceRetriever
- java.lang.Object
-
- com.itextpdf.styledxmlparser.resolver.resource.DefaultResourceRetriever
-
- com.itextpdf.styledxmlparser.css.parse.syntax.NoDuplicatesResourceRetriever
-
- All Implemented Interfaces:
IResourceRetriever
class NoDuplicatesResourceRetriever extends DefaultResourceRetriever
Implementation ofDefaultResourceRetriever
which returnsnull
if theURL
fromgetInputStreamByUrl(URL)
has been already processed by the current instance.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<java.lang.String>
processedUrls
-
Constructor Summary
Constructors Constructor Description NoDuplicatesResourceRetriever()
Creates a newNoDuplicatesResourceRetriever
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStream
getInputStreamByUrl(java.net.URL url)
Gets the input stream with current limit on the number of bytes read, that connect with source URL for retrieving data from that connection.-
Methods inherited from class com.itextpdf.styledxmlparser.resolver.resource.DefaultResourceRetriever
getByteArrayByUrl, getConnectTimeout, getReadTimeout, getResourceSizeByteLimit, setConnectTimeout, setReadTimeout, setResourceSizeByteLimit, urlFilter
-
-
-
-
Constructor Detail
-
NoDuplicatesResourceRetriever
NoDuplicatesResourceRetriever()
Creates a newNoDuplicatesResourceRetriever
instance.
-
-
Method Detail
-
getInputStreamByUrl
public java.io.InputStream getInputStreamByUrl(java.net.URL url) throws java.io.IOException
Description copied from class:DefaultResourceRetriever
Gets the input stream with current limit on the number of bytes read, that connect with source URL for retrieving data from that connection.- Specified by:
getInputStreamByUrl
in interfaceIResourceRetriever
- Overrides:
getInputStreamByUrl
in classDefaultResourceRetriever
- Parameters:
url
- the source URL- Returns:
- the limited input stream or null if the URL was filtered
- Throws:
java.io.IOException
- if any input/output issue occurs
-
-