jdk/src/share/classes/sun/net/www/content/image/x_xpixmap.java
changeset 10596 39b3a979e600
parent 5506 202f599c92aa
child 11362 02eae572563e
equal deleted inserted replaced
10595:c5be3e19fbab 10596:39b3a979e600
     1 /*
     1 /*
     2  * Copyright (c) 1994, 1999, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1994, 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
    33 public class x_xpixmap extends ContentHandler {
    33 public class x_xpixmap extends ContentHandler {
    34     public Object getContent(URLConnection urlc) throws java.io.IOException {
    34     public Object getContent(URLConnection urlc) throws java.io.IOException {
    35         return new URLImageSource(urlc);
    35         return new URLImageSource(urlc);
    36     }
    36     }
    37 
    37 
    38     public Object getContent(URLConnection urlc, Class[] classes) throws java.io.IOException {
    38     public Object getContent(URLConnection urlc, Class<?>[] classes) throws java.io.IOException {
    39         for (int i = 0; i < classes.length; i++) {
    39         for (int i = 0; i < classes.length; i++) {
    40           if (classes[i].isAssignableFrom(URLImageSource.class)) {
    40           if (classes[i].isAssignableFrom(URLImageSource.class)) {
    41                 return new URLImageSource(urlc);
    41                 return new URLImageSource(urlc);
    42           }
    42           }
    43           if (classes[i].isAssignableFrom(Image.class)) {
    43           if (classes[i].isAssignableFrom(Image.class)) {