79 * @see java.net.URLConnection |
79 * @see java.net.URLConnection |
80 * @see java.net.URLConnection#getContent() |
80 * @see java.net.URLConnection#getContent() |
81 * @see java.net.URLConnection#setContentHandlerFactory(java.net.ContentHandlerFactory) |
81 * @see java.net.URLConnection#setContentHandlerFactory(java.net.ContentHandlerFactory) |
82 * @since 1.0 |
82 * @since 1.0 |
83 */ |
83 */ |
84 abstract public class ContentHandler { |
84 public abstract class ContentHandler { |
85 |
85 |
86 /** |
86 /** |
87 * Given a URL connect stream positioned at the beginning of the |
87 * Given a URL connect stream positioned at the beginning of the |
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 * @exception IOException if an I/O error occurs while reading the object. |
94 */ |
94 */ |
95 abstract public 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 |
99 * representation of an object, this method reads that stream and |
99 * representation of an object, this method reads that stream and |
100 * creates an object that matches one of the types specified. |
100 * creates an object that matches one of the types specified. |