src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlReader.java

changeset 397
b99d7e355d4b
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
equal deleted inserted replaced
393:6cdc6ed98780 397:b99d7e355d4b
1 /* 1 /*
2 * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
84 // between here and the real data source, and larger buffers keep 84 // between here and the real data source, and larger buffers keep
85 // that from slowing you down.) 85 // that from slowing you down.)
86 // 86 //
87 87
88 /** 88 /**
89 * Constructs the reader from an input stream, auto-detecting 89 * Constructs the reader from an input stream, autodetecting
90 * the encoding to use according to the heuristic specified 90 * the encoding to use according to the heuristic specified
91 * in the XML 1.0 recommendation. 91 * in the XML 1.0 recommendation.
92 * 92 *
93 * @param in the input stream from which the reader is constructed 93 * @param in the input stream from which the reader is constructed
94 * @throws IOException on error, such as unrecognized encoding 94 * @throws IOException on error, such as unrecognized encoding
102 * from standard encoding names to ones that understood by 102 * from standard encoding names to ones that understood by
103 * Java where necessary. 103 * Java where necessary.
104 * 104 *
105 * @param in the input stream from which the reader is constructed 105 * @param in the input stream from which the reader is constructed
106 * @param encoding the IETF standard name of the encoding to use; 106 * @param encoding the IETF standard name of the encoding to use;
107 * if null, auto-detection is used. 107 * if null, autodetection is used.
108 * @throws IOException on error, including unrecognized encoding 108 * @throws IOException on error, including unrecognized encoding
109 */ 109 */
110 public static Reader createReader(InputStream in, String encoding) 110 public static Reader createReader(InputStream in, String encoding)
111 throws IOException { 111 throws IOException {
112 if (encoding == null) 112 if (encoding == null)

mercurial