public abstract class AbstractPath<FS extends FileSystem> extends Object implements Path, AttrHolder
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractPath.RootInfo |
| Modifier and Type | Field and Description |
|---|---|
protected AttrsStorage |
attrsStorage |
static String |
DEFAULT_WINDOWS_DRIVER |
protected File |
file |
protected FS |
fs |
protected String |
host |
protected boolean |
isAbsolute |
protected boolean |
isNormalized |
protected boolean |
isRealPath |
protected boolean |
isRoot |
protected List<org.uberfire.commons.data.Pair<Integer,Integer>> |
offsets |
protected byte[] |
path |
protected String |
toStringFormat |
protected boolean |
usesWindowsFormat |
static Pattern |
WINDOWS_DRIVER |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPath(FS fs,
File file) |
protected |
AbstractPath(FS fs,
String path,
String host,
boolean isRoot,
boolean isRealPath,
boolean isNormalized) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final Pattern WINDOWS_DRIVER
public static final String DEFAULT_WINDOWS_DRIVER
protected final FS extends FileSystem fs
protected final boolean usesWindowsFormat
protected final boolean isAbsolute
protected final byte[] path
protected final boolean isRoot
protected final boolean isRealPath
protected final boolean isNormalized
protected final String host
protected String toStringFormat
protected File file
protected final AttrsStorage attrsStorage
protected abstract Path newPath(FS fs, String substring, String host, boolean realPath, boolean isNormalized)
protected abstract AbstractPath.RootInfo setupRoot(FS fs, String path, String host, boolean isRoot)
public FS getFileSystem()
getFileSystem in interface Pathpublic boolean isAbsolute()
isAbsolute in interface Pathpublic Path getFileName()
getFileName in interface Pathpublic int getNameCount()
getNameCount in interface Pathpublic Path getName(int index) throws IllegalArgumentException
getName in interface PathIllegalArgumentExceptionpublic Path subpath(int beginIndex, int endIndex) throws IllegalArgumentException
subpath in interface PathIllegalArgumentExceptionpublic URI toUri() throws IOException, SecurityException
toUri in interface PathIOExceptionSecurityExceptionpublic Path toAbsolutePath() throws IOException, SecurityException
toAbsolutePath in interface PathIOExceptionSecurityExceptionprotected abstract String defaultDirectory()
public Path toRealPath(LinkOption... options) throws IOException, SecurityException
toRealPath in interface PathIOExceptionSecurityExceptionpublic boolean startsWith(Path other)
startsWith in interface Pathpublic boolean startsWith(String other) throws InvalidPathException
startsWith in interface PathInvalidPathExceptionpublic boolean endsWith(String other) throws InvalidPathException
endsWith in interface PathInvalidPathExceptionpublic Path resolve(String other) throws InvalidPathException
resolve in interface PathInvalidPathExceptionpublic Path resolveSibling(Path other)
resolveSibling in interface Pathpublic Path resolveSibling(String other) throws InvalidPathException
resolveSibling in interface PathInvalidPathExceptionpublic Path relativize(Path otherx) throws IllegalArgumentException
relativize in interface PathIllegalArgumentExceptionpublic int compareTo(Path other)
compareTo in interface Comparable<Path>public WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws UnsupportedOperationException, IllegalArgumentException, ClosedWatchServiceException, IOException, SecurityException
register in interface WatchableUnsupportedOperationExceptionIllegalArgumentExceptionClosedWatchServiceExceptionIOExceptionSecurityExceptionpublic WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events) throws UnsupportedOperationException, IllegalArgumentException, ClosedWatchServiceException, IOException, SecurityException
register in interface WatchableUnsupportedOperationExceptionIllegalArgumentExceptionClosedWatchServiceExceptionIOExceptionSecurityExceptionpublic String toString(boolean addHost)
public void clearCache()
public String getHost()
public boolean isRealPath()
public AttrsStorage getAttrStorage()
getAttrStorage in interface AttrHolderpublic <V extends AttributeView> void addAttrView(V view)
addAttrView in interface AttrHolderpublic <V extends AttributeView> V getAttrView(Class<V> type)
getAttrView in interface AttrHolderpublic <V extends AttributeView> V getAttrView(String name)
getAttrView in interface AttrHolderCopyright © 2012–2016 JBoss by Red Hat. All rights reserved.