1
package com.thaiopensource.xml.em;
6
* Information about an open external entity.
7
* This is used to by <code>EntityManager</code> to return
8
* information about an external entity that is has opened.
11
public class OpenEntity {
12
private final Reader reader;
13
private final String baseUri;
14
private final String location;
15
private final String encoding;
18
* Creates and initializes an <code>OpenEntity</code>. which uses
20
public OpenEntity(Reader reader, String location, String baseUri, String encoding) {
22
this.location = location;
23
this.baseUri = baseUri;
24
this.encoding = encoding;
28
* Returns an Reader containing the entity's bytes.
29
* If this is called more than once on the same
30
* OpenEntity, it will return the same Reader.
32
public final Reader getReader() {
37
* Returns the URI to use as the base URI for resolving relative URIs
38
* contained in the entity.
40
public final String getBaseUri() {
45
* Returns a string representation of the location of the entity
46
* suitable for use in error messages.
48
public final String getLocation() {
53
* Returns the encoding used by the entity or null if the encoding
54
* that was used is unknown.
56
public final String getEncoding() {