jdk/src/share/classes/java/net/ContentHandler.java
changeset 10596 39b3a979e600
parent 5506 202f599c92aa
child 11362 02eae572563e
equal deleted inserted replaced
10595:c5be3e19fbab 10596:39b3a979e600
     1 /*
     1 /*
     2  * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1995, 2011, 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
    94      *                 the first match of the suggested types.
    94      *                 the first match of the suggested types.
    95      *                 null if none of the requested  are supported.
    95      *                 null if none of the requested  are supported.
    96      * @exception  IOException  if an I/O error occurs while reading the object.
    96      * @exception  IOException  if an I/O error occurs while reading the object.
    97      * @since 1.3
    97      * @since 1.3
    98      */
    98      */
    99     public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
    99     public Object getContent(URLConnection urlc, Class<?>[] classes) throws IOException {
   100         Object obj = getContent(urlc);
   100         Object obj = getContent(urlc);
   101 
   101 
   102         for (int i = 0; i < classes.length; i++) {
   102         for (int i = 0; i < classes.length; i++) {
   103           if (classes[i].isInstance(obj)) {
   103           if (classes[i].isInstance(obj)) {
   104                 return obj;
   104                 return obj;