KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xinclude > XInclude11TextReader


1 /*
2  * Copyright 2003-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.xerces.xinclude;
17
18 import java.io.IOException JavaDoc;
19
20 import org.apache.xerces.util.XML11Char;
21 import org.apache.xerces.xni.parser.XMLInputSource;
22
23 /**
24  * This class is used for reading resources requested in <include> elements in
25  * XML 1.1 entities, when the parse attribute of the <include> element is "text".
26  * Using this class will open the location, detect the encoding, and discard the
27  * byte order mark, if applicable.
28  *
29  * @author Michael Glavassevich, IBM
30  *
31  * @version $Id: XInclude11TextReader.java,v 1.4 2005/01/11 13:40:29 mrglavas Exp $
32  *
33  * @see XIncludeHandler
34  */

35 public class XInclude11TextReader
36     extends XIncludeTextReader {
37
38     /**
39      * Construct the XIncludeReader using the XMLInputSource and XIncludeHandler.
40      *
41      * @param source The XMLInputSource to use.
42      * @param handler The XIncludeHandler to use.
43      * @param bufferSize The size of this text reader's buffer.
44      */

45     public XInclude11TextReader(XMLInputSource source, XIncludeHandler handler, int bufferSize)
46         throws IOException JavaDoc {
47         super(source, handler, bufferSize);
48     }
49     
50     /**
51      * Returns true if the specified character is a valid XML character
52      * as per the rules of XML 1.1.
53      *
54      * @param ch The character to check.
55      */

56     protected boolean isValid(int ch) {
57         return XML11Char.isXML11Valid(ch);
58     }
59 }
60
Popular Tags