1 16 17 package org.apache.xerces.xni.parser; 18 19 import org.apache.xerces.xni.XMLResourceIdentifier; 20 21 import java.io.InputStream ; 22 import java.io.Reader ; 23 24 38 public class XMLInputSource { 39 40 44 45 protected String fPublicId; 46 47 48 protected String fSystemId; 49 50 51 protected String fBaseSystemId; 52 53 54 protected InputStream fByteStream; 55 56 57 protected Reader fCharStream; 58 59 60 protected String fEncoding; 61 62 66 81 public XMLInputSource(String publicId, String systemId, 82 String baseSystemId) { 83 fPublicId = publicId; 84 fSystemId = systemId; 85 fBaseSystemId = baseSystemId; 86 } 88 95 public XMLInputSource(XMLResourceIdentifier resourceIdentifier) { 96 97 fPublicId = resourceIdentifier.getPublicId(); 98 fSystemId = resourceIdentifier.getLiteralSystemId(); 99 fBaseSystemId = resourceIdentifier.getBaseSystemId(); 100 } 102 117 public XMLInputSource(String publicId, String systemId, 118 String baseSystemId, InputStream byteStream, 119 String encoding) { 120 fPublicId = publicId; 121 fSystemId = systemId; 122 fBaseSystemId = baseSystemId; 123 fByteStream = byteStream; 124 fEncoding = encoding; 125 } 127 143 public XMLInputSource(String publicId, String systemId, 144 String baseSystemId, Reader charStream, 145 String encoding) { 146 fPublicId = publicId; 147 fSystemId = systemId; 148 fBaseSystemId = baseSystemId; 149 fCharStream = charStream; 150 fEncoding = encoding; 151 } 153 157 162 public void setPublicId(String publicId) { 163 fPublicId = publicId; 164 } 166 167 public String getPublicId() { 168 return fPublicId; 169 } 171 176 public void setSystemId(String systemId) { 177 fSystemId = systemId; 178 } 180 181 public String getSystemId() { 182 return fSystemId; 183 } 185 190 public void setBaseSystemId(String baseSystemId) { 191 fBaseSystemId = baseSystemId; 192 } 194 195 public String getBaseSystemId() { 196 return fBaseSystemId; 197 } 199 208 public void setByteStream(InputStream byteStream) { 209 fByteStream = byteStream; 210 } 212 213 public InputStream getByteStream() { 214 return fByteStream; 215 } 217 228 public void setCharacterStream(Reader charStream) { 229 fCharStream = charStream; 230 } 232 233 public Reader getCharacterStream() { 234 return fCharStream; 235 } 237 242 public void setEncoding(String encoding) { 243 fEncoding = encoding; 244 } 246 247 public String getEncoding() { 248 return fEncoding; 249 } 251 } | Popular Tags |