| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static interface | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| protected volatile String | |
| private final boolean | caseSensitive
Check to validate caseSensitive issues for specific case-insensitive FS. |
| private static final boolean | |
| private static final long | |
| private final PathResourceManager. | |
| protected volatile FileSystem | |
| private FileSystemWatcher | |
| private final boolean | followLinks
Check to allow follow symbolic links |
| private final List | |
| private static final Logger | |
| private static final PathResourceManager. | |
| private final TreeSet | safePaths
Used if followLinks == true. |
| private final long | transferMinSize
Size to use direct FS to network transfer (if supported by OS/JDK) instead of read/write |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | PathResourceManager(final Path base, long transferMinSize, boolean followLinks, final String... safePaths)
|
| protected | PathResourceManager(long transferMinSize, boolean caseSensitive, boolean followLinks, final String... safePaths)
|
| protected | PathResourceManager(long transferMinSize, boolean caseSensitive, boolean followLinks, boolean allowResourceChangeListeners, final String... safePaths)
|
| public | PathResourceManager(final Path base, long transferMinSize, boolean caseSensitive, boolean followLinks, final String... safePaths)
|
| public | PathResourceManager(final Path base, long transferMinSize, boolean caseSensitive, boolean followLinks, boolean allowResourceChangeListeners, final String... safePaths)
|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static PathResourceManager. | |
| public synchronized void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public Path | |
| protected PathResource | getFileResource(final Path file, final String path, final Path symlinkBase, String normalizedFile)
Apply security check for case insensitive file systems. |
| public Resource | getResource(final String
The path p)Implements io. Returns a resource for the given path. |
| private PathResourceManager. | getSymlinkBase(final String base, final Path file)
Returns true is some element of path inside base path is a symlink. |
| public long | |
| private boolean | isFileSameCase(final Path file, String normalizeFile)
Security check for case insensitive file systems. |
| public boolean | |
| private boolean | |
| public synchronized void | registerResourceChangeListener(ResourceChangeListener
The listener to register listener)Implements io. Registers a resource change listener, if the underlying resource manager support it |
| public synchronized void | removeResourceChangeListener(ResourceChangeListener listener)
Implements io. Removes a resource change listener |
| public PathResourceManager | |
| public PathResourceManager |
| allowResourceChangeListeners | back to summary |
|---|---|
| private final boolean allowResourceChangeListeners | |
| base | back to summary |
|---|---|
| protected volatile String base | |
| caseSensitive | back to summary |
|---|---|
| private final boolean caseSensitive Check to validate caseSensitive issues for specific case-insensitive FS. | |
| DEFAULT_CHANGE_LISTENERS_ALLOWED | back to summary |
|---|---|
| private static final boolean DEFAULT_CHANGE_LISTENERS_ALLOWED | |
| DEFAULT_TRANSFER_MIN_SIZE | back to summary |
|---|---|
| private static final long DEFAULT_TRANSFER_MIN_SIZE | |
| eTagFunction | back to summary |
|---|---|
| private final PathResourceManager. | |
| fileSystem | back to summary |
|---|---|
| protected volatile FileSystem fileSystem | |
| fileSystemWatcher | back to summary |
|---|---|
| private FileSystemWatcher fileSystemWatcher | |
| followLinks | back to summary |
|---|---|
| private final boolean followLinks Check to allow follow symbolic links | |
| listeners | back to summary |
|---|---|
| private final List<ResourceChangeListener> listeners | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| NULL_ETAG_FUNCTION | back to summary |
|---|---|
| private static final PathResourceManager. | |
| safePaths | back to summary |
|---|---|
| private final TreeSet<String> safePaths Used if followLinks == true. Set of paths valid to follow symbolic links. If this is empty and followLinks it true then all links will be followed | |
| transferMinSize | back to summary |
|---|---|
| private final long transferMinSize Size to use direct FS to network transfer (if supported by OS/JDK) instead of read/write | |
| PathResourceManager | back to summary |
|---|---|
| public PathResourceManager(final Path base) | |
| PathResourceManager | back to summary |
|---|---|
| public PathResourceManager(final Path base, long transferMinSize) | |
| PathResourceManager | back to summary |
|---|---|
| public PathResourceManager(final Path base, long transferMinSize, boolean caseSensitive) | |
| PathResourceManager | back to summary |
|---|---|
| public PathResourceManager(final Path base, long transferMinSize, boolean followLinks, final String... safePaths) | |
| PathResourceManager | back to summary |
|---|---|
| protected PathResourceManager(long transferMinSize, boolean caseSensitive, boolean followLinks, final String... safePaths) | |
| PathResourceManager | back to summary |
|---|---|
| protected PathResourceManager(long transferMinSize, boolean caseSensitive, boolean followLinks, boolean allowResourceChangeListeners, final String... safePaths) | |
| PathResourceManager | back to summary |
|---|---|
| public PathResourceManager(final Path base, long transferMinSize, boolean caseSensitive, boolean followLinks, final String... safePaths) | |
| PathResourceManager | back to summary |
|---|---|
| public PathResourceManager(final Path base, long transferMinSize, boolean caseSensitive, boolean followLinks, boolean allowResourceChangeListeners, final String... safePaths) | |
| PathResourceManager | back to summary |
|---|---|
| private PathResourceManager(PathResourceManager. | |
| builder | back to summary |
|---|---|
| public static PathResourceManager. | |
| close | back to summary |
|---|---|
| public synchronized void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| getBasePath | back to summary |
|---|---|
| public Path getBasePath() | |
| getFileResource | back to summary |
|---|---|
| protected PathResource getFileResource(final Path file, final String path, final Path symlinkBase, String normalizedFile) throws IOException Apply security check for case insensitive file systems. | |
| getResource | back to summary |
|---|---|
| public Resource getResource(final String p) Implements io. Doc from io. Returns a resource for the given path. It is the responsibility of the called to make sure that the path in Canonicalised. | |
| getSymlinkBase | back to summary |
|---|---|
| private PathResourceManager. Returns true is some element of path inside base path is a symlink. | |
| getTransferMinSize | back to summary |
|---|---|
| public long getTransferMinSize() | |
| isFileSameCase | back to summary |
|---|---|
| private boolean isFileSameCase(final Path file, String normalizeFile) throws IOException Security check for case insensitive file systems. We make sure the case of the filename matches the case of the request. This is only a check for case sensitivity, not for non canonical . and ../ which are allowed. For example: file.getName() == "page.jsp" && file.getCanonicalFile().getName() == "page.jsp" should return true file.getName() == "page.jsp" && file.getCanonicalFile().getName() == "page.JSP" should return false file.getName() == "./page.jsp" && file.getCanonicalFile().getName() == "page.jsp" should return true | |
| isResourceChangeListenerSupported | back to summary |
|---|---|
| public boolean isResourceChangeListenerSupported() Implements io.
| |
| isSymlinkSafe | back to summary |
|---|---|
| private boolean isSymlinkSafe(final Path file) throws IOException Security check for followSymlinks feature. Only follows those symbolink links defined in safePaths. | |
| registerResourceChangeListener | back to summary |
|---|---|
| public synchronized void registerResourceChangeListener(ResourceChangeListener listener) Implements io. Doc from io. Registers a resource change listener, if the underlying resource manager support it
| |
| removeResourceChangeListener | back to summary |
|---|---|
| public synchronized void removeResourceChangeListener(ResourceChangeListener listener) Implements io. Doc from io. Removes a resource change listener
| |
| setBase | back to summary |
|---|---|
| public PathResourceManager setBase(final Path base) | |
| setBase | back to summary |
|---|---|
| public PathResourceManager setBase(final File base) | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private Path | |
| private boolean | |
| private PathResourceManager. | |
| private boolean | |
| private String[] | |
| private long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ResourceManager | |
| public PathResourceManager. | |
| public PathResourceManager. | |
| public PathResourceManager. | |
| public PathResourceManager. | |
| public PathResourceManager. | |
| public PathResourceManager. | |
| public PathResourceManager. |
| allowResourceChangeListeners | back to summary |
|---|---|
| private boolean allowResourceChangeListeners | |
| base | back to summary |
|---|---|
| private Path base | |
| caseSensitive | back to summary |
|---|---|
| private boolean caseSensitive | |
| eTagFunction | back to summary |
|---|---|
| private PathResourceManager. | |
| followLinks | back to summary |
|---|---|
| private boolean followLinks | |
| safePaths | back to summary |
|---|---|
| private String[] safePaths | |
| transferMinSize | back to summary |
|---|---|
| private long transferMinSize | |
| Builder | back to summary |
|---|---|
| private Builder() | |
| build | back to summary |
|---|---|
| public ResourceManager build() | |
| setAllowResourceChangeListeners | back to summary |
|---|---|
| public PathResourceManager. | |
| setBase | back to summary |
|---|---|
| public PathResourceManager. | |
| setCaseSensitive | back to summary |
|---|---|
| public PathResourceManager. | |
| setETagFunction | back to summary |
|---|---|
| public PathResourceManager. | |
| setFollowLinks | back to summary |
|---|---|
| public PathResourceManager. | |
| setSafePaths | back to summary |
|---|---|
| public PathResourceManager. | |
| setTransferMinSize | back to summary |
|---|---|
| public PathResourceManager. | |
| Modifier and Type | Method and Description |
|---|---|
| public ETag |
| Modifier and Type | Field and Description |
|---|---|
| public final Path | |
| public final boolean |
| Access | Constructor and Description |
|---|---|
| private |
| path | back to summary |
|---|---|
| public final Path path | |
| requiresCheck | back to summary |
|---|---|
| public final boolean requiresCheck | |
| SymlinkResult | back to summary |
|---|---|
| private SymlinkResult(boolean requiresCheck, Path path) | |