|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.vfs.Path | +--com.caucho.vfs.MailtoPath
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 |
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, getTail, getUserPath, getValue, isDirectory, isFile, isObject, iterator, list, lookup, lookup, lookupNative, lookupNative, mkdir, mkdirs, openAppend, openAppendImpl, openRead, openReadImpl, 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 |
protected java.lang.String url
Method Detail |
protected Path schemeWalk(java.lang.String userPath, java.util.Map attributes, java.lang.String uri, int offset)
schemeWalk
in class Path
com.caucho.vfs.Path
userPath
- the user's lookup() path.newAttributes
- the attributes for the new path.newPath
- the lookup() pathoffset
- offset into newPath to start lookup.public java.lang.String getURL()
getURL
in class Path
public java.lang.String getScheme()
getScheme
in class Path
public java.lang.String getPath()
getPath
in class Path
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in class Path
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in class Path
public void removeAttribute(java.lang.String name)
removeAttribute
in class Path
protected StreamImpl openWriteImpl() throws java.io.IOException
openWriteImpl
in class Path
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |