Class UserAgent
java.lang.Object
com.realobjects.pdfreactor.useragent.UserAgent
- All Implemented Interfaces:
Closeable
,AutoCloseable
A UserAgent
can be passed to a PDFreactor
conversion via the Configuration
object.
The lifecycle of user agents doesn't end with the conversion and instances are intended to be re-used for multiple conversions.
Settings that are specified in the UserAgentConfiguration
always take precedence over those specified
in the Configuration
, even if the are null
.
User agent instances should be closed after they are no longer needed.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
UserAgent
Construct a newUserAgent
.- Parameters:
config
- The configuration.- Throws:
UserAgentException
- An exception when theUserAgent
could not be created, possibly due to misconfiguration.
-
-
Method Details
-
close
Closes theUserAgent
, freeing all of its resources. It is best practice to close the instance if it is no longer needed.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-