org.freecompany.infoset
Interface InfosetFactory<T>
public
interface
InfosetFactory<T>
Interface representing factory that builds
Infoset instances. An instance of this interface must be able to
construct concrete
Infoset instances from data streams.
Method Summary |
<V> Infoset<T> | adaptFrom(Infoset<V> infoset)
Converts an instance of the provided Infoset type to the native type for this factory.
|
<V> Infoset<V> | adaptTo(Class<V> clazz, Infoset<T> infoset)
Converts an instance of the provided Infoset type to the native type for this factory.
|
Infoset<T> | create(ReadableByteChannel channel)
Creates an infoset that will, when accessed, parse the content from the provided
URL. |
Infoset<T> | create(InputStream input)
Creates an infoset that will, when accessed, parse the content from the provided
URL. |
Infoset<T> | create(URL url)
Creates an infoset that will, when accessed, parse the content from the provided
InputStream. |
Converts an instance of the provided
Infoset type to the native type for this factory.
If the factory does not support the conversion, it should return
null
.
Converts an instance of the provided
Infoset type to the native type for this factory.
If the factory does not support the conversion, it should return
null
.
public
Infoset<
T> create(ReadableByteChannel channel)
Creates an infoset that will, when accessed, parse the content from the provided
URL. Once parsed, the content will be cached, so anything that wishes to
modify the resulting Document must clone it first.
public
Infoset<
T> create(InputStream input)
Creates an infoset that will, when accessed, parse the content from the provided
URL. Once parsed, the content will be cached, so anything that wishes to
modify the resulting Document must clone it first.
Creates an infoset that will, when accessed, parse the content from the provided
InputStream. Once parsed, the content will be cached, so anything that wishes to
modify the resulting Document must clone it first.