equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1995, 2019, 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 |
88 * representation of an object, this method reads that stream and |
88 * representation of an object, this method reads that stream and |
89 * creates an object from it. |
89 * creates an object from it. |
90 * |
90 * |
91 * @param urlc a URL connection. |
91 * @param urlc a URL connection. |
92 * @return the object read by the {@code ContentHandler}. |
92 * @return the object read by the {@code ContentHandler}. |
93 * @exception IOException if an I/O error occurs while reading the object. |
93 * @throws IOException if an I/O error occurs while reading the object. |
94 */ |
94 */ |
95 public abstract Object getContent(URLConnection urlc) throws IOException; |
95 public abstract Object getContent(URLConnection urlc) throws IOException; |
96 |
96 |
97 /** |
97 /** |
98 * Given a URL connect stream positioned at the beginning of the |
98 * Given a URL connect stream positioned at the beginning of the |
106 * @param urlc a URL connection. |
106 * @param urlc a URL connection. |
107 * @param classes an array of types requested |
107 * @param classes an array of types requested |
108 * @return the object read by the {@code ContentHandler} that is |
108 * @return the object read by the {@code ContentHandler} that is |
109 * the first match of the suggested types or |
109 * the first match of the suggested types or |
110 * {@code null} if none of the requested are supported. |
110 * {@code null} if none of the requested are supported. |
111 * @exception IOException if an I/O error occurs while reading the object. |
111 * @throws IOException if an I/O error occurs while reading the object. |
112 * @since 1.3 |
112 * @since 1.3 |
113 */ |
113 */ |
114 @SuppressWarnings("rawtypes") |
114 @SuppressWarnings("rawtypes") |
115 public Object getContent(URLConnection urlc, Class[] classes) throws IOException { |
115 public Object getContent(URLConnection urlc, Class[] classes) throws IOException { |
116 Object obj = getContent(urlc); |
116 Object obj = getContent(urlc); |