org.apache.xerces.xinclude
Class XIncludeTextReader
java.lang.Object
|
+--org.apache.xerces.xinclude.XIncludeTextReader
- public class XIncludeTextReader
- extends java.lang.Object
- Author:
- Peter McCracken, IBM, Arun Yadav, Sun Microsystem
Constructor Summary |
XIncludeTextReader(org.apache.xerces.xni.parser.XMLInputSource source,
XIncludeHandler handler)
Construct the XIncludeReader using the XMLInputSource and XIncludeHandler. |
Method Summary |
void |
close()
|
protected java.lang.Object[] |
getEncodingName(byte[] b4,
int count)
REVISIT: This code is take from org.apache.xerces.impl.XMLEntityManager. |
protected java.lang.String |
getEncodingName(java.io.InputStream stream)
|
protected java.io.Reader |
getReader(org.apache.xerces.xni.parser.XMLInputSource source)
Return the Reader for given XMLInputSource. |
void |
parse()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XIncludeTextReader
public XIncludeTextReader(org.apache.xerces.xni.parser.XMLInputSource source,
XIncludeHandler handler)
throws java.io.IOException
- Construct the XIncludeReader using the XMLInputSource and XIncludeHandler.
- Parameters:
source
- The XMLInputSource to use.handler
- The XIncludeHandler to use.
getReader
protected java.io.Reader getReader(org.apache.xerces.xni.parser.XMLInputSource source)
throws java.io.IOException
- Return the Reader for given XMLInputSource.
- Parameters:
source
- The XMLInputSource to use.
getEncodingName
protected java.lang.String getEncodingName(java.io.InputStream stream)
throws java.io.IOException
getEncodingName
protected java.lang.Object[] getEncodingName(byte[] b4,
int count)
- REVISIT: This code is take from org.apache.xerces.impl.XMLEntityManager.
Is there any way we can share the code, without having it implemented twice?
I think we should make it public and static in XMLEntityManager. --PJM
Returns the IANA encoding name that is auto-detected from
the bytes specified, with the endian-ness of that encoding where appropriate.
- Parameters:
b4
- The first four bytes of the input.count
- The number of bytes actually read.- Returns:
- a 2-element array: the first element, an IANA-encoding string,
the second element a Boolean which is true iff the document is big endian, false
if it's little-endian, and null if the distinction isn't relevant.
parse
public void parse()
throws java.io.IOException
close
public void close()
throws java.io.IOException
Copyright © 1999-2003 Apache XML Project. All Rights Reserved.