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

## com.caucho.vfs
Class MailtoPath

    java.lang.Object
      |
      +--com.caucho.vfs.Path
            |
            +--com.caucho.vfs.MailtoPath

public class MailtoPath
extends Path

The mailto: scheme sends mail using the SMTP protocol. Attributes set headers. Headers can be set as long as no data has been flushed. ``

     WriteStream os = Vfs.openWrite("mailto:nobody@foo.com");
     os.setAttribute("subject", "Reminder message");

     os.println("This is just a simple reminder.");
     os.close();

The attributes set SMTP headers:

- subject - message subject
- to - recipient
- cc - copy list
- bcc - blind copy list
- X-foo - user-specified header

You can also set attributes in the URL as query parameters. ``

     Vfs.openWrite("mailto:nobody@foo.com?subject=dinner");

Field Summary
`protected java.lang.String` | `url`

Fields inherited from class com.caucho.vfs.Path
`L, schemeMap`

Method Summary
`java.lang.Object` | `getAttribute(java.lang.String name)` Gets the value of the RFC822 message headers.
`java.lang.String` | `getPath()` The path looks like "mailto:user@host.com"
`java.lang.String` | `getScheme()` The scheme is "mailto:"
`java.lang.String` | `getURL()` The URL looks like "mailto:user@host.com"
`protected StreamImpl` | `openWriteImpl()` Implementation to open a WriteStream.
`void` | `removeAttribute(java.lang.String name)` Remove the named attribute.
`protected Path` | `schemeWalk(java.lang.String userPath, java.util.Map attributes, java.lang.String uri, int offset)` Parse the scheme for the recipient and the attributes.
`void` | `setAttribute(java.lang.String name, java.lang.Object value)` Sets one of the RFC822 message headers.

Methods inherited from class com.caucho.vfs.Path
`bind, canRead, canWrite, createNewFile, createRoot, createRoot, createTempFile, equals, exists, getAttributeNames, getContentType, getFullPath, getHost, getLastModified, getLength, getNativePath, getObject, getParent, getPort, getQuery, getResources, getResources, getTail, getUserPath, getValue, isDirectory, isFile, isObject, iterator, list, lookup, lookup, lookupNative, lookupNative, mkdir, mkdirs, openAppend, openAppendImpl, openRead, openReadImpl, openReadWrite, openReadWrite, openReadWriteImpl, openWrite, remove, renameTo, renameTo, scanScheme, setLastModified, setObject, setUserPath, setValue, toString, unbind, writeToStream`

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

Field Detail

### url

    protected java.lang.String url

Method Detail

### schemeWalk

    protected Path schemeWalk(java.lang.String userPath,
                              java.util.Map attributes,
                              java.lang.String uri,
                              int offset)

  Parse the scheme for the recipient and the attributes.
  Overrides:
    `schemeWalk` in class `Path`
  Following copied from class: `com.caucho.vfs.Path`
  Parameters:
    `userPath` - the user's lookup() path.
    `newAttributes` - the attributes for the new path.
    `newPath` - the lookup() path
    `offset` - offset into newPath to start lookup.
  Returns:
    the found path

### getURL

    public java.lang.String getURL()

  The URL looks like "mailto:user@host.com"
  Overrides:
    `getURL` in class `Path`

### getScheme

    public java.lang.String getScheme()

  The scheme is "mailto:"
  Overrides:
    `getScheme` in class `Path`

### getPath

    public java.lang.String getPath()

  The path looks like "mailto:user@host.com"
  Overrides:
    `getPath` in class `Path`

### setAttribute

    public void setAttribute(java.lang.String name,
                             java.lang.Object value)

  Sets one of the RFC822 message headers.
  Overrides:
    `setAttribute` in class `Path`

### getAttribute

    public java.lang.Object getAttribute(java.lang.String name)

  Gets the value of the RFC822 message headers.
  Overrides:
    `getAttribute` in class `Path`

### removeAttribute

    public void removeAttribute(java.lang.String name)

  Remove the named attribute.
  Overrides:
    `removeAttribute` in class `Path`

### openWriteImpl

    protected StreamImpl openWriteImpl()
                                throws java.io.IOException

  Implementation to open a WriteStream.
  Overrides:
    `openWriteImpl` in class `Path`

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