Implementation Note
This class needs to maintain JDK 8 source compatibility. It is used internally in the JDK to implement jimage/jrtfs access, but also compiled and delivered as part of the jrtfs.jar to support access to the jimage file provided by the shipped JDK by tools running on JDK 8.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final char[] | |
| pack-priv final JrtFileSystem | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private volatile int[] | |
| private final String | |
| private volatile String |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final void | |
| private JrtPath | |
| public final int | compareTo(Path other)
Implements java. Compares two abstract paths lexicographically. |
| pack-priv final void | |
| private void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | |
| public final boolean | endsWith(Path other)
Implements java. Tests if this path ends with the given path. |
| public final boolean | endsWith(String other)
Overrides default java. Tests if this path ends with a |
| public final boolean | equals(Object obj)
Overrides java. Implements java. Tests this path for equality with the given object. |
| private boolean | |
| pack-priv final boolean | |
| pack-priv final JrtFileAttributes | |
| public final JrtPath | getFileName()
Implements java. Returns the name of the file or directory denoted by this path as a
|
| pack-priv final FileStore | |
| public JrtFileSystem | getFileSystem()
Implements java. Returns the file system that created this object. |
| pack-priv final String | |
| public final JrtPath | getName(int index)
Implements java. Returns a name element of this path as a |
| public final int | getNameCount()
Implements java. Returns the number of name elements in the path. |
| public final JrtPath | getParent()
Implements java. Returns the parent path, or |
| private String | |
| pack-priv final String | |
| public final JrtPath | getRoot()
Implements java. Returns the root component of this path as a |
| public final int | hashCode()
Overrides java. Implements java. Computes a hash code for this path. |
| private static long | |
| private static long | |
| private void | |
| public final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| public final Iterator | iterator()
Overrides default java. Returns an iterator over the name elements of this path. |
| private static long | |
| private static long | |
| private static boolean | |
| pack-priv final void | |
| pack-priv final SeekableByteChannel | |
| pack-priv final DirectoryStream | |
| pack-priv final FileChannel | |
| pack-priv final InputStream | |
| pack-priv final OutputStream | |
| public final JrtPath | normalize()
Implements java. Returns a path that is this path with redundant name elements eliminated. |
| private static String | |
| private static String | |
| pack-priv final Map | |
| pack-priv final JrtPath | |
| public final WatchKey | register(WatchService watcher, WatchEvent.
Implements java. Registers the file located by this path with a watch service. |
| public final WatchKey | register(WatchService watcher, WatchEvent.
Overrides default java. Registers the file located by this path with a watch service. |
| public final JrtPath | relativize(Path other)
Implements java. Constructs a relative path between this path and a given path. |
| public final JrtPath | |
| public final JrtPath | resolve(String other)
Overrides default java. Converts a given path string to a |
| private String | |
| public final Path | resolveSibling(Path other)
Overrides default java. Resolves the given path against this path's |
| public final Path | resolveSibling(String other)
Overrides default java. Converts a given path string to a |
| pack-priv final void | |
| pack-priv final void | |
| public final boolean | startsWith(Path other)
Implements java. Tests if this path starts with the given path. |
| public final boolean | startsWith(String other)
Overrides default java. Tests if this path starts with a |
| public final JrtPath | subpath(int beginIndex, int endIndex)
Implements java. Returns a relative |
| public final JrtPath | toAbsolutePath()
Implements java. Returns a |
| public final File | |
| public final JrtPath | toRealPath(LinkOption... options)
Implements java. Returns the real path of an existing file. |
| public final String | toString()
Overrides java. Implements java. Returns the string representation of this path. |
| public final URI | |
| private static URI |
| H_ALPHA | back to summary |
|---|---|
| private static final long H_ALPHA | |
| H_ALPHANUM | back to summary |
|---|---|
| private static final long H_ALPHANUM | |
| H_DIGIT | back to summary |
|---|---|
| private static final long H_DIGIT | |
| H_LOWALPHA | back to summary |
|---|---|
| private static final long H_LOWALPHA | |
| H_MARK | back to summary |
|---|---|
| private static final long H_MARK | |
| H_PATH | back to summary |
|---|---|
| private static final long H_PATH | |
| H_PCHAR | back to summary |
|---|---|
| private static final long H_PCHAR | |
| H_UNRESERVED | back to summary |
|---|---|
| private static final long H_UNRESERVED | |
| H_UPALPHA | back to summary |
|---|---|
| private static final long H_UPALPHA | |
| hexDigits | back to summary |
|---|---|
| private static final char[] hexDigits | |
| jrtfs | back to summary |
|---|---|
| pack-priv final JrtFileSystem jrtfs | |
| L_ALPHA | back to summary |
|---|---|
| private static final long L_ALPHA | |
| L_ALPHANUM | back to summary |
|---|---|
| private static final long L_ALPHANUM | |
| L_DIGIT | back to summary |
|---|---|
| private static final long L_DIGIT | |
| L_LOWALPHA | back to summary |
|---|---|
| private static final long L_LOWALPHA | |
| L_MARK | back to summary |
|---|---|
| private static final long L_MARK | |
| L_PATH | back to summary |
|---|---|
| private static final long L_PATH | |
| L_PCHAR | back to summary |
|---|---|
| private static final long L_PCHAR | |
| L_UNRESERVED | back to summary |
|---|---|
| private static final long L_UNRESERVED | |
| L_UPALPHA | back to summary |
|---|---|
| private static final long L_UPALPHA | |
| offsets | back to summary |
|---|---|
| private volatile int[] offsets | |
| path | back to summary |
|---|---|
| private final String path | |
| resolved | back to summary |
|---|---|
| private volatile String resolved | |
| JrtPath | back to summary |
|---|---|
| pack-priv JrtPath(JrtFileSystem jrtfs, String path) | |
| JrtPath | back to summary |
|---|---|
| pack-priv JrtPath(JrtFileSystem jrtfs, String path, boolean normalized) | |
| checkAccess | back to summary |
|---|---|
| pack-priv final void checkAccess(AccessMode... modes) throws IOException | |
| checkPath | back to summary |
|---|---|
| private JrtPath checkPath(Path path) | |
| compareTo | back to summary |
|---|---|
| public final int compareTo(Path other) Implements java. Doc from java. Compares two abstract paths lexicographically. The ordering defined by this method is provider specific, and in the case of the default provider, platform specific. This method does not access the file system and neither file is required to exist. This method may not be used to compare paths that are associated with different file system providers.
| |
| copy | back to summary |
|---|---|
| pack-priv final void copy(JrtPath target, CopyOption... options) throws IOException | |
| copyToTarget | back to summary |
|---|---|
| private void copyToTarget(JrtPath target, CopyOption... options) throws IOException | |
| createDirectory | back to summary |
|---|---|
| pack-priv final void createDirectory(FileAttribute<?>... attrs) throws IOException | |
| delete | back to summary |
|---|---|
| pack-priv final void delete() throws IOException | |
| deleteIfExists | back to summary |
|---|---|
| pack-priv final void deleteIfExists() throws IOException | |
| endsWith | back to summary |
|---|---|
| public final boolean endsWith(Path other) Implements java. Doc from java. Tests if this path ends with the given path. If the given path has N elements, and no root component, and this path has N or more elements, then this path ends with the given path if the last N elements of each path, starting at the element farthest from the root, are equal. If the given path has a root component then this path ends with the given path if the root component of this path ends with the root component of the given path, and the corresponding elements of both paths are equal. Whether or not the root component of this path ends with the root component of the given path is file system specific. If this path does not have a root component and the given path has a root component then this path does not end with the given path. If the given path is associated with a different
| |
| endsWith | back to summary |
|---|---|
| public final boolean endsWith(String other) Overrides default java. Doc from java. Tests if this path ends with a
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object obj) Overrides java. Implements java. Doc from java. Tests this path for equality with the given object. If the given object is not a Path, or is a Path associated with a
different Whether or not two path are equal depends on the file system
implementation. In some cases the paths are compared without regard
to case, and others are case sensitive. This method does not access the
file system and the file is not required to exist. Where required, the
This method satisfies the general contract of the
| |
| equalsNameAt | back to summary |
|---|---|
| private boolean equalsNameAt(JrtPath other, int index) | |
| exists | back to summary |
|---|---|
| pack-priv final boolean exists() | |
| getAttributes | back to summary |
|---|---|
| pack-priv final JrtFileAttributes getAttributes(LinkOption... options) throws IOException | |
| getFileName | back to summary |
|---|---|
| public final JrtPath getFileName() Implements java. Doc from java. Returns the name of the file or directory denoted by this path as a
| |
| getFileStore | back to summary |
|---|---|
| pack-priv final FileStore getFileStore() throws IOException | |
| getFileSystem | back to summary |
|---|---|
| public JrtFileSystem getFileSystem() Implements java. Doc from java. Returns the file system that created this object.
| |
| getName | back to summary |
|---|---|
| pack-priv final String getName() | |
| getName | back to summary |
|---|---|
| public final JrtPath getName(int index) Implements java. Doc from java. Returns a name element of this path as a The
| |
| getNameCount | back to summary |
|---|---|
| public final int getNameCount() Implements java. Doc from java. Returns the number of name elements in the path.
| |
| getParent | back to summary |
|---|---|
| public final JrtPath getParent() Implements java. Doc from java. Returns the parent path, or The parent of this path object consists of this path's root
component, if any, and each element in the path except for the
farthest from the root in the directory hierarchy. This method
does not access the file system; the path or its parent may not exist.
Furthermore, this method does not eliminate special names such as "."
and ".." that may be used in some implementations. On UNIX for example,
the parent of " If this path has more than one element, and no root component, then this method is equivalent to evaluating the expression: subpath(0, getNameCount()-1);
| |
| getResolved | back to summary |
|---|---|
| private String getResolved() | |
| getResolvedPath | back to summary |
|---|---|
| pack-priv final String getResolvedPath() | |
| getRoot | back to summary |
|---|---|
| public final JrtPath getRoot() Implements java. Doc from java. Returns the root component of this path as a
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Implements java. Doc from java. Computes a hash code for this path. The hash code is based upon the components of the path, and
satisfies the general contract of the
| |
| highMask | back to summary |
|---|---|
| private static long highMask(String chars) | |
| highMask | back to summary |
|---|---|
| private static long highMask(char first, char last) | |
| initOffsets | back to summary |
|---|---|
| private void initOffsets() | |
| isAbsolute | back to summary |
|---|---|
| public final boolean isAbsolute() Implements java. Doc from java. Tells whether or not this path is absolute. An absolute path is complete in that it doesn't need to be combined with other path information in order to locate a file.
| |
| isHidden | back to summary |
|---|---|
| pack-priv final boolean isHidden() | |
| isSameFile | back to summary |
|---|---|
| pack-priv final boolean isSameFile(Path other) throws IOException | |
| iterator | back to summary |
|---|---|
| public final Iterator Overrides default java. Doc from java. Returns an iterator over the name elements of this path. The first element returned by the iterator represents the name
element that is closest to the root in the directory hierarchy, the
second element is the next closest, and so on. The last element returned
is the name of the file or directory denoted by this path. The
| |
| lowMask | back to summary |
|---|---|
| private static long lowMask(String chars) | |
| lowMask | back to summary |
|---|---|
| private static long lowMask(char first, char last) | |
| match | back to summary |
|---|---|
| private static boolean match(char c, long lowMask, long highMask) | |
| move | back to summary |
|---|---|
| pack-priv final void move(JrtPath target, CopyOption... options) throws IOException | |
| newByteChannel | back to summary |
|---|---|
| pack-priv final SeekableByteChannel newByteChannel(Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException | |
| newDirectoryStream | back to summary |
|---|---|
| pack-priv final DirectoryStream | |
| newFileChannel | back to summary |
|---|---|
| pack-priv final FileChannel newFileChannel(Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException | |
| newInputStream | back to summary |
|---|---|
| pack-priv final InputStream newInputStream(OpenOption... options) throws IOException | |
| newOutputStream | back to summary |
|---|---|
| pack-priv final OutputStream newOutputStream(OpenOption... options) throws IOException | |
| normalize | back to summary |
|---|---|
| public final JrtPath normalize() Implements java. Doc from java. Returns a path that is this path with redundant name elements eliminated. The precise definition of this method is implementation dependent but
in general it derives from this path, a path that does not contain
redundant name elements. In many file systems, the " This method does not access the file system; the path may not locate
a file that exists. Eliminating "
| |
| normalize | back to summary |
|---|---|
| private static String normalize(String path) | |
| normalize | back to summary |
|---|---|
| private static String normalize(String path, int off) | |
| readAttributes | back to summary |
|---|---|
| pack-priv final Map | |
| readSymbolicLink | back to summary |
|---|---|
| pack-priv final JrtPath readSymbolicLink() throws IOException | |
| register | back to summary |
|---|---|
| public final WatchKey register(WatchService watcher, WatchEvent. Implements java. Doc from java. Registers the file located by this path with a watch service. In this release, this path locates a directory that exists. The
directory is registered with the watch service so that entries in the
directory can be watched. The
The The set of events may include additional implementation specific
event that are not defined by the enum The Where a file is registered with a watch service by means of a symbolic link then it is implementation specific if the watch continues to depend on the existence of the symbolic link after it is registered.
| |
| register | back to summary |
|---|---|
| public final WatchKey register(WatchService watcher, WatchEvent. Overrides default java. Doc from java. Registers the file located by this path with a watch service. An invocation of this method behaves in exactly the same way as the invocation register(watcher, events, new WatchEvent.Modifier[0]); Usage Example: Suppose we wish to register a directory for entry create, delete, and modify events: Path dir = ... WatchService watcher = ... WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
| |
| relativize | back to summary |
|---|---|
| public final JrtPath relativize(Path other) Implements java. Doc from java. Constructs a relative path between this path and a given path. Relativization is the inverse of For any two p When symbolic links are supported, then whether the resulting path,
when resolved against this path, yields a path that can be used to locate
the
| |
| resolve | back to summary |
|---|---|
| public final JrtPath resolve(Path other) Implements java. Doc from java. Resolve the given path against this path. If the
| |
| resolve | back to summary |
|---|---|
| public final JrtPath resolve(String other) Overrides default java. Doc from java. Converts a given path string to a
| |
| resolvePath | back to summary |
|---|---|
| private String resolvePath() | |
| resolveSibling | back to summary |
|---|---|
| public final Path resolveSibling(Path other) Overrides default java. Doc from java. Resolves the given path against this path's
| |
| resolveSibling | back to summary |
|---|---|
| public final Path resolveSibling(String other) Overrides default java. Doc from java. Converts a given path string to a
| |
| setAttribute | back to summary |
|---|---|
| pack-priv final void setAttribute(String attribute, Object value, LinkOption... options) throws IOException | |
| setTimes | back to summary |
|---|---|
| pack-priv final void setTimes(FileTime mtime, FileTime atime, FileTime ctime) throws IOException | |
| startsWith | back to summary |
|---|---|
| public final boolean startsWith(Path other) Implements java. Doc from java. Tests if this path starts with the given path. This path starts with the given path if this path's root
component starts with the root component of the given path,
and this path starts with the same name elements as the given path.
If the given path has more name elements than this path then Whether or not the root component of this path starts with the root component of the given path is file system specific. If this path does not have a root component and the given path has a root component then this path does not start with the given path. If the given path is associated with a different
| |
| startsWith | back to summary |
|---|---|
| public final boolean startsWith(String other) Overrides default java. Doc from java. Tests if this path starts with a
| |
| subpath | back to summary |
|---|---|
| public final JrtPath subpath(int beginIndex, int endIndex) Implements java. Doc from java. Returns a relative The
| |
| toAbsolutePath | back to summary |
|---|---|
| public final JrtPath toAbsolutePath() Implements java. Doc from java. Returns a If this path is already
| |
| toFile | back to summary |
|---|---|
| public final File toFile() Overrides default java. Doc from java. Returns a If this path was created by invoking the
| |
| toRealPath | back to summary |
|---|---|
| public final JrtPath toRealPath(LinkOption... options) throws IOException Implements java. Doc from java. Returns the real path of an existing file. The precise definition of this method is implementation dependent but
in general it derives from this path, an If this path is relative then its absolute path is first obtained,
as if by invoking the The
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Implements java. Doc from java. Returns the string representation of this path. If this path was created by converting a path string using the
The returned path string uses the default name
| |
| toUri | back to summary |
|---|---|
| public final URI toUri() Implements java. Doc from java. Returns a URI to represent this path. This method constructs an absolute In the case of the default provider, the URI is hierarchical with
a The default provider provides a similar round-trip guarantee
to the so long as the original Path, the URI, and the new Path are all created in (possibly different invocations of) the same
Java virtual machine. Whether other providers make any guarantees is
provider specific and therefore unspecified.
When a file system is constructed to access the contents of a file as a file system then it is highly implementation specific if the returned URI represents the given path in the file system or it represents a compound URI that encodes the URI of the enclosing file system. A format for compound URIs is not defined in this release; such a scheme may be added in a future release.
| |
| toUri | back to summary |
|---|---|
| private static URI toUri(String str) | |