Package org.faceless.publisher.resource
Class DataURLConnectionFactory
java.lang.Object
org.faceless.publisher.resource.DataURLConnectionFactory
- All Implemented Interfaces:
URLConnectionFactory
A subclass of URLConnection that can be used to read from "data" URLs.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic URL2
create
(MediaType mediaType, InputStream data, Origin origin) Create a data URIstatic URL2
Create a data URIgetURLConnection
(URL2 uri, ReportFactory reportFactory) Return a URLConnection for the specified URI, or null if not possible with this factory.boolean
Return true if this factory can load the specified URI schema (eg http, ftp, jar, jdbc)toString()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.faceless.publisher.resource.URLConnectionFactory
close, getExpiry, getURLConnectionProcessors, isTrusted, isUnchanged, setURLConnectionProcessors
-
Constructor Details
-
DataURLConnectionFactory
public DataURLConnectionFactory()
-
-
Method Details
-
create
Create a data URI- Parameters:
mediaType
- the content typedata
- the content, which will not be base-64 encodedorigin
- the origin for this data URI
-
create
Create a data URI- Parameters:
mediaType
- the content typedata
- the content, which will be base-64 encodedorigin
- the origin for this data URI- Throws:
IOException
-
getURLConnection
Description copied from interface:URLConnectionFactory
Return a URLConnection for the specified URI, or null if not possible with this factory.- Specified by:
getURLConnection
in interfaceURLConnectionFactory
- Parameters:
uri
- the URIreportFactory
- the ReportFactory that owns this connection- Throws:
IOException
-
toString
-
supports
Description copied from interface:URLConnectionFactory
Return true if this factory can load the specified URI schema (eg http, ftp, jar, jdbc)- Specified by:
supports
in interfaceURLConnectionFactory
- Parameters:
uri
- the URI
-