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

## org.jboss.net.protocol.file
Class FileURLConnection

    java.lang.Object
      java.net.URLConnection
          org.jboss.net.protocol.file.FileURLConnection

public class FileURLConnection
extends URLConnection

Provides local file access via URL semantics, correctly returning the last modified time of the underlying file.

Version:
  $Revision: 1.9 $
Author:
  Jason Dillon, Scott.Stark@jboss.org

Field Summary
`protected File` | `file`

Fields inherited from class java.net.URLConnection
`allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches`

Constructor Summary
`FileURLConnection(URL url)`

Method Summary
`void` | `connect()` Checks if the underlying file for this connection exists.
`File` | `getFile()` Returns the underlying file for this connection.
`String` | `getHeaderField(String name)` Provides support for returning the value for the `last-modified` header.
`InputStream` | `getInputStream()`
`long` | `getLastModified()` Returns the last modified time of the underlying file.
`OutputStream` | `getOutputStream()`
`Permission` | `getPermission()` Return a permission for reading of the file

Methods inherited from class java.net.URLConnection
`addRequestProperty, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString`

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

Field Detail

### file

    protected File file

Constructor Detail

### FileURLConnection

    public FileURLConnection(URL url)
                      throws MalformedURLException,
                             IOException

Method Detail

### getFile

    public File getFile()

  Returns the underlying file for this connection.

### connect

    public void connect()
                 throws IOException

  Checks if the underlying file for this connection exists.

  Throws:
    `FileNotFoundException`
    `IOException`

### getInputStream

    public InputStream getInputStream()
                               throws IOException

  Throws:
    `IOException`

### getOutputStream

    public OutputStream getOutputStream()
                                 throws IOException

  Throws:
    `IOException`

### getHeaderField

    public String getHeaderField(String name)

  Provides support for returning the value for the `last-modified` header.

### getPermission

    public Permission getPermission()
                             throws IOException

  Return a permission for reading of the file

  Throws:
    `IOException`

### getLastModified

    public long getLastModified()

  Returns the last modified time of the underlying file.

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

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.