~vcs-imports/xena/trunk

« back to all changes in this revision

Viewing changes to ext/src/xerces-2_9_1/src/org/apache/xerces/xinclude/XInclude11TextReader.java

  • Committer: matthewoliver
  • Date: 2009-12-10 03:18:07 UTC
  • Revision ID: vcs-imports@canonical.com-20091210031807-l086qguzdlljtkl9
Merged Xena Testing into Xena Stable for the Xena 5 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
 
3
 * contributor license agreements.  See the NOTICE file distributed with
 
4
 * this work for additional information regarding copyright ownership.
 
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
 
6
 * (the "License"); you may not use this file except in compliance with
 
7
 * the License.  You may obtain a copy of the License at
 
8
 * 
 
9
 *      http://www.apache.org/licenses/LICENSE-2.0
 
10
 * 
 
11
 * Unless required by applicable law or agreed to in writing, software
 
12
 * distributed under the License is distributed on an "AS IS" BASIS,
 
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
14
 * See the License for the specific language governing permissions and
 
15
 * limitations under the License.
 
16
 */
 
17
 
 
18
package org.apache.xerces.xinclude;
 
19
 
 
20
import java.io.IOException;
 
21
 
 
22
import org.apache.xerces.util.XML11Char;
 
23
import org.apache.xerces.xni.parser.XMLInputSource;
 
24
 
 
25
/**
 
26
 * This class is used for reading resources requested in <include> elements in
 
27
 * XML 1.1 entities, when the parse attribute of the <include> element is "text".
 
28
 * Using this class will open the location, detect the encoding, and discard the 
 
29
 * byte order mark, if applicable.
 
30
 * 
 
31
 * @author Michael Glavassevich, IBM
 
32
 *
 
33
 * @version $Id: XInclude11TextReader.java,v 1.2 2009/12/10 03:18:45 matthewoliver Exp $
 
34
 *
 
35
 * @see XIncludeHandler
 
36
 */
 
37
public class XInclude11TextReader
 
38
    extends XIncludeTextReader {
 
39
 
 
40
    /**
 
41
     * Construct the XIncludeReader using the XMLInputSource and XIncludeHandler.
 
42
     *
 
43
     * @param source The XMLInputSource to use.
 
44
     * @param handler The XIncludeHandler to use.
 
45
     * @param bufferSize The size of this text reader's buffer.
 
46
     */
 
47
    public XInclude11TextReader(XMLInputSource source, XIncludeHandler handler, int bufferSize)
 
48
        throws IOException {
 
49
        super(source, handler, bufferSize);
 
50
    }
 
51
    
 
52
    /**
 
53
     * Returns true if the specified character is a valid XML character
 
54
     * as per the rules of XML 1.1.
 
55
     *
 
56
     * @param ch The character to check.
 
57
     */
 
58
    protected boolean isValid(int ch) {
 
59
        return XML11Char.isXML11Valid(ch);
 
60
    }
 
61
}