: Class URLDataSource

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.activation
Class URLDataSource

    java.lang.Object
      |
      +--javax.activation.URLDataSource

All Implemented Interfaces:
  DataSource

public class URLDataSource
extends java.lang.Object
implements DataSource

A data source based on a URL.

Version:
  $Revision: 1.3 $
Author:
  Andrew Selkirk

Constructor Summary
`URLDataSource(java.net.URL url)` Create new URL data source from URL.

Method Summary
`java.lang.String` | `getContentType()` Get the content type of the URL data source.
`java.io.InputStream` | `getInputStream()` Get input stream of the URL
`java.lang.String` | `getName()` Get name of the URL.
`java.io.OutputStream` | `getOutputStream()` Get output stream.
`java.net.URL` | `getURL()` Get the URL.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### URLDataSource

    public URLDataSource(java.net.URL url)

  Create new URL data source from URL.
  Parameters:
    `url` - URL

Method Detail

### getName

    public java.lang.String getName()

  Get name of the URL.
  Specified by:
    `getName` in interface `DataSource`
  Returns:
    Name of the data source

### getURL

    public java.net.URL getURL()

  Get the URL.
  Returns:
    URL of the data source

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  Get input stream of the URL
  Specified by:
    `getInputStream` in interface `DataSource`
  Returns:
    Input stream of data source
  Throws:
    `java.io.IOException` - IO exception occurred

### getContentType

    public java.lang.String getContentType()

  Get the content type of the URL data source.
  Specified by:
    `getContentType` in interface `DataSource`
  Returns:
    Content type

### getOutputStream

    public java.io.OutputStream getOutputStream()
                                         throws java.io.IOException

  Get output stream.
  Specified by:
    `getOutputStream` in interface `DataSource`
  Returns:
    Output stream of data source
  Throws:
    `java.io.IOException` - IO exception occurred

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© Copyright 2002 the Free Software Foundation, all rights reserved.