Package io.sf.carte.doc.agent
Interface UserAgent
- All Known Implementing Classes:
AbstractUserAgent
,DOMCSSStyleSheetFactory.WrapperUserAgent
public interface UserAgent
Very basic user agent abstraction.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
User agent configuration and control. -
Method Summary
Modifier and TypeMethodDescriptionGet the control object for this user agent.boolean
isVisitedURL
(URL url) Has the provided url been visited by this user agent.Reads and parses a markup document located at the given URL.void
setEntityResolver
(EntityResolver resolver) Sets the entity resolver to be used when parsing documents.
-
Method Details
-
readURL
Reads and parses a markup document located at the given URL.- Parameters:
url
- the URL that points to the document.- Returns:
- the CSSDocument.
- Throws:
IOException
- if there is an I/O problem reading the URL.DocumentException
- if there is a problem parsing the document.
-
isVisitedURL
Has the provided url been visited by this user agent.- Parameters:
url
- the URL to test.- Returns:
true
if the URL was visited by this agent,false
if not visited or this agent does not support history.
-
setEntityResolver
Sets the entity resolver to be used when parsing documents.- Parameters:
resolver
- the entity resolver.
-
getAgentControl
UserAgent.AgentControl getAgentControl()Get the control object for this user agent.- Returns:
- the control object for this user agent, or null if this agent has no control.
-