public final class DTDAcceleratorImpl extends Object implements DTDAccelerator
DTDAccelerator
.
This class is thread-safe.
Constructor and Description |
---|
DTDAcceleratorImpl(int capacity)
Constructs a cache having specified capacity (>= 1).
|
Modifier and Type | Method and Description |
---|---|
void |
clear(Console console)
Clear the cache.
|
InputSource |
get(URL dtdURL,
DTDSpec[] dtdSpec,
Console console)
Fetch the fake DTD from the cache.
|
int |
getCapacity()
Returns the capacity of the cache.
|
public DTDAcceleratorImpl(int capacity)
public int getCapacity()
public InputSource get(URL dtdURL, DTDSpec[] dtdSpec, Console console)
DTDAccelerator
get
in interface DTDAccelerator
dtdURL
- The URL of the DTD of interestdtdSpec
- Both an in and out argument:
console
- Information messages are reported using this console.
May be null
.null
if the DTD cannot be loaded or cannot be acceleratedpublic void clear(Console console)
DTDAccelerator
clear
in interface DTDAccelerator
console
- Information messages are reported using this console.
May be null
.