public class MailtoPath extends Path
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");
Path.FileChannelFactory
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
url |
_pathSeparatorChar, _schemeMap, _separatorChar, L
Modifier and Type | Method and Description |
---|---|
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.
|
bind, cacheCopy, canExecute, canRead, canWrite, changeGroup, changeGroup, changeOwner, changeOwner, chmod, clearStatusCache, compareTo, copy, createDepend, createLink, createNewFile, createRoot, createRoot, createTempFile, equals, escapeURL, exists, fileChannelFactory, 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, lookupChild, 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, sendfile, setDefaultSchemeMap, setExecutable, setLastModified, setObject, setTestWindows, setUserPath, setValue, toString, truncate, truncate, unbind, unwrap, writeToStream, writeToStream
public Path schemeWalk(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String uri, int offset)
schemeWalk
in class Path
userPath
- the user's lookup() path.attributes
- the attributes for the new path.uri
- the lookup() pathoffset
- offset into newPath to start lookup.public java.lang.String getURL()
public java.lang.String getScheme()
public java.lang.String getPath()
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in class Path
public StreamImpl openWriteImpl() throws java.io.IOException
openWriteImpl
in class Path
java.io.IOException