@@ -145,11 +145,11 @@ public XmlStreamReader(final File file) throws IOException {
145145 * It does a lenient charset encoding detection, check the constructor with
146146 * the lenient parameter for details.
147147 *
148- * @param is InputStream to create a Reader from.
148+ * @param inputStream InputStream to create a Reader from.
149149 * @throws IOException thrown if there is a problem reading the stream.
150150 */
151- public XmlStreamReader (final InputStream is ) throws IOException {
152- this (is , true );
151+ public XmlStreamReader (final InputStream inputStream ) throws IOException {
152+ this (inputStream , true );
153153 }
154154
155155 /**
@@ -172,15 +172,15 @@ public XmlStreamReader(final InputStream is) throws IOException {
172172 * If lenient detection is indicated an XmlStreamReaderException is never
173173 * thrown.
174174 *
175- * @param is InputStream to create a Reader from.
175+ * @param inputStream InputStream to create a Reader from.
176176 * @param lenient indicates if the charset encoding detection should be
177177 * relaxed.
178178 * @throws IOException thrown if there is a problem reading the stream.
179179 * @throws XmlStreamReaderException thrown if the charset encoding could not
180180 * be determined according to the specs.
181181 */
182- public XmlStreamReader (final InputStream is , final boolean lenient ) throws IOException {
183- this (is , lenient , null );
182+ public XmlStreamReader (final InputStream inputStream , final boolean lenient ) throws IOException {
183+ this (inputStream , lenient , null );
184184 }
185185
186186 /**
@@ -203,18 +203,18 @@ public XmlStreamReader(final InputStream is, final boolean lenient) throws IOExc
203203 * If lenient detection is indicated an XmlStreamReaderException is never
204204 * thrown.
205205 *
206- * @param is InputStream to create a Reader from.
206+ * @param inputStream InputStream to create a Reader from.
207207 * @param lenient indicates if the charset encoding detection should be
208208 * relaxed.
209209 * @param defaultEncoding The default encoding
210210 * @throws IOException thrown if there is a problem reading the stream.
211211 * @throws XmlStreamReaderException thrown if the charset encoding could not
212212 * be determined according to the specs.
213213 */
214- public XmlStreamReader (final InputStream is , final boolean lenient , final String defaultEncoding )
214+ public XmlStreamReader (final InputStream inputStream , final boolean lenient , final String defaultEncoding )
215215 throws IOException {
216216 this .defaultEncoding = defaultEncoding ;
217- final BOMInputStream bom = new BOMInputStream (new BufferedInputStream (is , BUFFER_SIZE ), false , BOMS );
217+ final BOMInputStream bom = new BOMInputStream (new BufferedInputStream (inputStream , BUFFER_SIZE ), false , BOMS );
218218 final BOMInputStream pis = new BOMInputStream (bom , true , XML_GUESS_BYTES );
219219 this .encoding = doRawStream (bom , pis , lenient );
220220 this .reader = new InputStreamReader (pis , encoding );
@@ -264,8 +264,8 @@ public XmlStreamReader(final URLConnection conn, final String defaultEncoding) t
264264 this .defaultEncoding = defaultEncoding ;
265265 final boolean lenient = true ;
266266 final String contentType = conn .getContentType ();
267- final InputStream is = conn .getInputStream ();
268- final BOMInputStream bom = new BOMInputStream (new BufferedInputStream (is , BUFFER_SIZE ), false , BOMS );
267+ final InputStream inputStream = conn .getInputStream ();
268+ final BOMInputStream bom = new BOMInputStream (new BufferedInputStream (inputStream , BUFFER_SIZE ), false , BOMS );
269269 final BOMInputStream pis = new BOMInputStream (bom , true , XML_GUESS_BYTES );
270270 if (conn instanceof HttpURLConnection || contentType != null ) {
271271 this .encoding = doHttpStream (bom , pis , contentType , lenient );
@@ -287,14 +287,14 @@ public XmlStreamReader(final URLConnection conn, final String defaultEncoding) t
287287 * It does a lenient charset encoding detection, check the constructor with
288288 * the lenient parameter for details.
289289 *
290- * @param is InputStream to create the reader from.
290+ * @param inputStream InputStream to create the reader from.
291291 * @param httpContentType content-type header to use for the resolution of
292292 * the charset encoding.
293293 * @throws IOException thrown if there is a problem reading the file.
294294 */
295- public XmlStreamReader (final InputStream is , final String httpContentType )
295+ public XmlStreamReader (final InputStream inputStream , final String httpContentType )
296296 throws IOException {
297- this (is , httpContentType , true );
297+ this (inputStream , httpContentType , true );
298298 }
299299
300300 /**
@@ -321,7 +321,7 @@ public XmlStreamReader(final InputStream is, final String httpContentType)
321321 * If lenient detection is indicated an XmlStreamReaderException is never
322322 * thrown.
323323 *
324- * @param is InputStream to create the reader from.
324+ * @param inputStream InputStream to create the reader from.
325325 * @param httpContentType content-type header to use for the resolution of
326326 * the charset encoding.
327327 * @param lenient indicates if the charset encoding detection should be
@@ -331,10 +331,10 @@ public XmlStreamReader(final InputStream is, final String httpContentType)
331331 * @throws XmlStreamReaderException thrown if the charset encoding could not
332332 * be determined according to the specs.
333333 */
334- public XmlStreamReader (final InputStream is , final String httpContentType ,
334+ public XmlStreamReader (final InputStream inputStream , final String httpContentType ,
335335 final boolean lenient , final String defaultEncoding ) throws IOException {
336336 this .defaultEncoding = defaultEncoding ;
337- final BOMInputStream bom = new BOMInputStream (new BufferedInputStream (is , BUFFER_SIZE ), false , BOMS );
337+ final BOMInputStream bom = new BOMInputStream (new BufferedInputStream (inputStream , BUFFER_SIZE ), false , BOMS );
338338 final BOMInputStream pis = new BOMInputStream (bom , true , XML_GUESS_BYTES );
339339 this .encoding = doHttpStream (bom , pis , httpContentType , lenient );
340340 this .reader = new InputStreamReader (pis , encoding );
@@ -364,7 +364,7 @@ public XmlStreamReader(final InputStream is, final String httpContentType,
364364 * If lenient detection is indicated an XmlStreamReaderException is never
365365 * thrown.
366366 *
367- * @param is InputStream to create the reader from.
367+ * @param inputStream InputStream to create the reader from.
368368 * @param httpContentType content-type header to use for the resolution of
369369 * the charset encoding.
370370 * @param lenient indicates if the charset encoding detection should be
@@ -373,9 +373,9 @@ public XmlStreamReader(final InputStream is, final String httpContentType,
373373 * @throws XmlStreamReaderException thrown if the charset encoding could not
374374 * be determined according to the specs.
375375 */
376- public XmlStreamReader (final InputStream is , final String httpContentType ,
376+ public XmlStreamReader (final InputStream inputStream , final String httpContentType ,
377377 final boolean lenient ) throws IOException {
378- this (is , httpContentType , lenient , null );
378+ this (inputStream , httpContentType , lenient , null );
379379 }
380380
381381 /**
@@ -693,26 +693,26 @@ static String getContentTypeEncoding(final String httpContentType) {
693693 /**
694694 * Returns the encoding declared in the <?xml encoding=...?>, NULL if none.
695695 *
696- * @param is InputStream to create the reader from.
696+ * @param inputStream InputStream to create the reader from.
697697 * @param guessedEnc guessed encoding
698698 * @return the encoding declared in the <?xml encoding=...?>
699699 * @throws IOException thrown if there is a problem reading the stream.
700700 */
701- private static String getXmlProlog (final InputStream is , final String guessedEnc )
701+ private static String getXmlProlog (final InputStream inputStream , final String guessedEnc )
702702 throws IOException {
703703 String encoding = null ;
704704 if (guessedEnc != null ) {
705705 final byte [] bytes = new byte [BUFFER_SIZE ];
706- is .mark (BUFFER_SIZE );
706+ inputStream .mark (BUFFER_SIZE );
707707 int offset = 0 ;
708708 int max = BUFFER_SIZE ;
709- int c = is .read (bytes , offset , max );
709+ int c = inputStream .read (bytes , offset , max );
710710 int firstGT = -1 ;
711711 String xmlProlog = "" ; // avoid possible NPE warning (cannot happen; this just silences the warning)
712712 while (c != -1 && firstGT == -1 && offset < BUFFER_SIZE ) {
713713 offset += c ;
714714 max -= c ;
715- c = is .read (bytes , offset , max );
715+ c = inputStream .read (bytes , offset , max );
716716 xmlProlog = new String (bytes , 0 , offset , guessedEnc );
717717 firstGT = xmlProlog .indexOf ('>' );
718718 }
@@ -726,7 +726,7 @@ private static String getXmlProlog(final InputStream is, final String guessedEnc
726726 }
727727 final int bytesRead = offset ;
728728 if (bytesRead > 0 ) {
729- is .reset ();
729+ inputStream .reset ();
730730 final BufferedReader bReader = new BufferedReader (new StringReader (
731731 xmlProlog .substring (0 , firstGT + 1 )));
732732 final StringBuffer prolog = new StringBuffer ();
0 commit comments