public final class HTTPInputSource
extends org.apache.xerces.xni.parser.XMLInputSource
XMLInputSource
an HTTP input
source also has HTTP request properties and a preference
whether HTTP redirects will be followed. Note that these
properties will only be used if reading this input source
will induce an HTTP connection.Modifier and Type | Field and Description |
---|---|
protected boolean |
fFollowRedirects
Preference for whether HTTP redirects should be followed.
|
protected java.util.Map |
fHTTPRequestProperties
HTTP request properties.
|
Constructor and Description |
---|
HTTPInputSource(java.lang.String publicId,
java.lang.String systemId,
java.lang.String baseSystemId)
Constructs an input source from just the public and system
identifiers, leaving resolution of the entity and opening of
the input stream up to the caller.
|
HTTPInputSource(java.lang.String publicId,
java.lang.String systemId,
java.lang.String baseSystemId,
java.io.InputStream byteStream,
java.lang.String encoding)
Constructs an input source from a byte stream.
|
HTTPInputSource(java.lang.String publicId,
java.lang.String systemId,
java.lang.String baseSystemId,
java.io.Reader charStream,
java.lang.String encoding)
Constructs an input source from a character stream.
|
HTTPInputSource(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)
Constructs an input source from a XMLResourceIdentifier
object, leaving resolution of the entity and opening of
the input stream up to the caller.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getFollowHTTPRedirects()
Returns the preference whether HTTP redirects should
be followed.
|
java.util.Iterator |
getHTTPRequestProperties()
Returns an iterator for the request properties this
input source contains.
|
java.lang.String |
getHTTPRequestProperty(java.lang.String key)
Returns the value of the request property
associated with the given property name.
|
void |
setFollowHTTPRedirects(boolean followRedirects)
Sets the preference whether HTTP redirects should
be followed.
|
void |
setHTTPRequestProperty(java.lang.String key,
java.lang.String value)
Sets the value of the request property
associated with the given property name.
|
protected boolean fFollowRedirects
protected java.util.Map fHTTPRequestProperties
public HTTPInputSource(java.lang.String publicId, java.lang.String systemId, java.lang.String baseSystemId)
publicId
- The public identifier, if known.systemId
- The system identifier. This value should
always be set, if possible, and can be
relative or absolute. If the system identifier
is relative, then the base system identifier
should be set.baseSystemId
- The base system identifier. This value should
always be set to the fully expanded URI of the
base system identifier, if possible.public HTTPInputSource(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)
resourceIdentifier
- the XMLResourceIdentifier containing the informationpublic HTTPInputSource(java.lang.String publicId, java.lang.String systemId, java.lang.String baseSystemId, java.io.InputStream byteStream, java.lang.String encoding)
publicId
- The public identifier, if known.systemId
- The system identifier. This value should
always be set, if possible, and can be
relative or absolute. If the system identifier
is relative, then the base system identifier
should be set.baseSystemId
- The base system identifier. This value should
always be set to the fully expanded URI of the
base system identifier, if possible.byteStream
- The byte stream.encoding
- The encoding of the byte stream, if known.public HTTPInputSource(java.lang.String publicId, java.lang.String systemId, java.lang.String baseSystemId, java.io.Reader charStream, java.lang.String encoding)
publicId
- The public identifier, if known.systemId
- The system identifier. This value should
always be set, if possible, and can be
relative or absolute. If the system identifier
is relative, then the base system identifier
should be set.baseSystemId
- The base system identifier. This value should
always be set to the fully expanded URI of the
base system identifier, if possible.charStream
- The character stream.encoding
- The original encoding of the byte stream
used by the reader, if known.public boolean getFollowHTTPRedirects()
public void setFollowHTTPRedirects(boolean followRedirects)
public java.lang.String getHTTPRequestProperty(java.lang.String key)
key
- the name of the request propertynull
if this property has not
been setpublic java.util.Iterator getHTTPRequestProperties()
java.util.Map.Entry
where each key and value are a pair of strings corresponding
to the name and value of a request property.public void setHTTPRequestProperty(java.lang.String key, java.lang.String value)
key
- the name of the request propertyvalue
- the value of the request propertyCopyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.