gnu.xml.dom.ls
Class DomLSInput
- LSInput
Specification of XML input to parse.
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
getBaseURI
public String getBaseURI()
The base URI to be used (see section 5.1.4 in [
IETF RFC 2396]) for
resolving a relative
systemId
to an absolute URI.
If, when used, the base URI is itself a relative URI, an empty
string, or null, the behavior is implementation dependent.
- getBaseURI in interface LSInput
getByteStream
public InputStream getByteStream()
An attribute of a language and binding dependent type that represents
a stream of bytes.
If the application knows the character encoding of the byte
stream, it should set the encoding attribute. Setting the encoding in
this way will override any encoding specified in an XML declaration
in the data.
- getByteStream in interface LSInput
getCharacterStream
public Reader getCharacterStream()
An attribute of a language and binding dependent type that represents
a stream of 16-bit units. The application must encode the stream
using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when
using character streams. If an XML declaration is present, the value
of the encoding attribute will be ignored.
- getCharacterStream in interface LSInput
getEncoding
public String getEncoding()
The character encoding, if known. The encoding must be a string
acceptable for an XML encoding declaration ([
XML 1.0] section
4.3.3 "Character Encoding in Entities").
This attribute has no effect when the application provides a
character stream or string data. For other sources of input, an
encoding specified by means of this attribute will override any
encoding specified in the XML declaration or the Text declaration, or
an encoding obtained from a higher level protocol, such as HTTP [
IETF RFC 2616].
- getEncoding in interface LSInput
getPublicId
public String getPublicId()
The public identifier for this input source. This may be mapped to an
input source using an implementation dependent mechanism (such as
catalogues or other mappings). The public identifier, if specified,
may also be reported as part of the location information when errors
are reported.
- getPublicId in interface LSInput
getStringData
public String getStringData()
String data to parse. If provided, this will always be treated as a
sequence of 16-bit units (UTF-16 encoded characters). It is not a
requirement to have an XML declaration when using
stringData
. If an XML declaration is present, the value
of the encoding attribute will be ignored.
- getStringData in interface LSInput
getSystemId
public String getSystemId()
The system identifier, a URI reference [
IETF RFC 2396], for this
input source. The system identifier is optional if there is a byte
stream, a character stream, or string data. It is still useful to
provide one, since the application will use it to resolve any
relative URIs and can include it in error messages and warnings. (The
LSParser will only attempt to fetch the resource identified by the
URI reference if there is no other input available in the input
source.)
If the application knows the character encoding of the object
pointed to by the system identifier, it can set the encoding using
the
encoding
attribute.
If the specified system ID is a relative URI reference (see
section 5 in [
IETF RFC 2396]), the DOM
implementation will attempt to resolve the relative URI with the
baseURI
as the base, if that fails, the behavior is
implementation dependent.
- getSystemId in interface LSInput
setBaseURI
public void setBaseURI(String baseURI)
The base URI to be used (see section 5.1.4 in [
IETF RFC 2396]) for
resolving a relative
systemId
to an absolute URI.
If, when used, the base URI is itself a relative URI, an empty
string, or null, the behavior is implementation dependent.
- setBaseURI in interface LSInput
setByteStream
public void setByteStream(InputStream byteStream)
An attribute of a language and binding dependent type that represents
a stream of bytes.
If the application knows the character encoding of the byte
stream, it should set the encoding attribute. Setting the encoding in
this way will override any encoding specified in an XML declaration
in the data.
- setByteStream in interface LSInput
setCharacterStream
public void setCharacterStream(Reader characterStream)
An attribute of a language and binding dependent type that represents
a stream of 16-bit units. The application must encode the stream
using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when
using character streams. If an XML declaration is present, the value
of the encoding attribute will be ignored.
- setCharacterStream in interface LSInput
setEncoding
public void setEncoding(String encoding)
The character encoding, if known. The encoding must be a string
acceptable for an XML encoding declaration ([
XML 1.0] section
4.3.3 "Character Encoding in Entities").
This attribute has no effect when the application provides a
character stream or string data. For other sources of input, an
encoding specified by means of this attribute will override any
encoding specified in the XML declaration or the Text declaration, or
an encoding obtained from a higher level protocol, such as HTTP [
IETF RFC 2616].
- setEncoding in interface LSInput
setPublicId
public void setPublicId(String publicId)
The public identifier for this input source. This may be mapped to an
input source using an implementation dependent mechanism (such as
catalogues or other mappings). The public identifier, if specified,
may also be reported as part of the location information when errors
are reported.
- setPublicId in interface LSInput
setStringData
public void setStringData(String stringData)
String data to parse. If provided, this will always be treated as a
sequence of 16-bit units (UTF-16 encoded characters). It is not a
requirement to have an XML declaration when using
stringData
. If an XML declaration is present, the value
of the encoding attribute will be ignored.
- setStringData in interface LSInput
setSystemId
public void setSystemId(String systemId)
The system identifier, a URI reference [
IETF RFC 2396], for this
input source. The system identifier is optional if there is a byte
stream, a character stream, or string data. It is still useful to
provide one, since the application will use it to resolve any
relative URIs and can include it in error messages and warnings. (The
LSParser will only attempt to fetch the resource identified by the
URI reference if there is no other input available in the input
source.)
If the application knows the character encoding of the object
pointed to by the system identifier, it can set the encoding using
the
encoding
attribute.
If the specified system ID is a relative URI reference (see
section 5 in [
IETF RFC 2396]), the DOM
implementation will attempt to resolve the relative URI with the
baseURI
as the base, if that fails, the behavior is
implementation dependent.
- setSystemId in interface LSInput
DomLSInput.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.