com.caucho.vfs
Class MailtoPath

java.lang.Object
  extended by com.caucho.vfs.Path
      extended by com.caucho.vfs.MailtoPath
All Implemented Interfaces:
java.lang.Comparable<Path>

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:

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
_pathSeparatorChar, _schemeMap, _separatorChar, L
 
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"
 StreamImpl openWriteImpl()
          Implementation to open a WriteStream.
 Path schemeWalk(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String uri, int offset)
          Parse the scheme for the recipient and the attributes.
 
Methods inherited from class com.caucho.vfs.Path
bind, cacheCopy, canExecute, canRead, canWrite, changeGroup, changeGroup, changeOwner, changeOwner, chmod, clearStatusCache, compareTo, copy, createDepend, createLink, createNewFile, createRoot, createRoot, createTempFile, equals, escapeURL, exists, getAttributeNames, getBlockCount, getBlockSize, getCache, getCertificates, getContentType, getCrc64, getCreateTime, getDevice, getDeviceId, getDiskSpaceFree, getDiskSpaceTotal, getFileSeparatorChar, getFullPath, getGroup, getHost, getInode, getLastAccessTime, getLastModified, getLastStatusChangeTime, getLength, getMode, getNativePath, getNewlineString, getNumberOfLinks, getObject, getOwner, getParent, getPathSeparatorChar, getPort, getQuery, getRelativePath, getResources, getResources, getSchemeMap, getSeparatorChar, getTail, getUser, getUserDir, getUserPath, getValue, hashCode, isBlockDevice, isCharacterDevice, isDirectory, isExecutable, isFIFO, isFile, isHardLink, isLink, isObject, isPathCacheable, isSocket, isSymbolicLink, isWindows, isWindowsInsecure, iterator, list, lookup, lookup, lookup, lookupImpl, lookupNative, lookupNative, lookupRelativeNativePath, mkdir, mkdirs, openAppend, openAppendImpl, openFileRandomAccess, openMemoryMappedFile, openRandomAccess, openRead, openReadImpl, openReadWrite, openReadWrite, openReadWrite, openReadWriteImpl, openWrite, putCache, readLink, realPath, remove, removeAll, renameTo, renameTo, scanScheme, setDefaultSchemeMap, setExecutable, setLastModified, setObject, setTestWindows, setUserPath, setValue, toString, truncate, truncate, unbind, writeToStream, writeToStream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

url

protected java.lang.String url
Method Detail

schemeWalk

public Path schemeWalk(java.lang.String userPath,
                       java.util.Map<java.lang.String,java.lang.Object> attributes,
                       java.lang.String uri,
                       int offset)
Parse the scheme for the recipient and the attributes.

Specified by:
schemeWalk in class Path
Parameters:
userPath - the user's lookup() path.
attributes - the attributes for the new path.
uri - 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:"

Specified by:
getScheme in class Path

getPath

public java.lang.String getPath()
The path looks like "mailto:user@host.com"

Specified by:
getPath 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

openWriteImpl

public StreamImpl openWriteImpl()
                         throws java.io.IOException
Implementation to open a WriteStream.

Overrides:
openWriteImpl in class Path
Throws:
java.io.IOException