Class ArchPaths
java.lang.Object
org.epics.archiverappliance.utils.nio.ArchPaths
- All Implemented Interfaces:
Closeable,AutoCloseable
This is a replacement for NIO Paths that caters to our syntax rules.
Normal file system paths are all similar to linux file names.
The compressed use the jar:file:syntax.
For example,
jar:file:///ziptest/alltext.zip!/SomeTextFile.txt- Author:
- luofeng, mshankar
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Return a path based on a varargs list of path components.Return a path based on the full URI representation of the path.Return a path based on a varargs list of path components.static SeekableByteChannelnewByteChannel(Path path, OpenOption... options) Returns a seekable byte channel.
-
Field Details
-
ZIP_PREFIX
- See Also:
-
-
Constructor Details
-
ArchPaths
public ArchPaths()
-
-
Method Details
-
newByteChannel
public static SeekableByteChannel newByteChannel(Path path, OpenOption... options) throws IOException Returns a seekable byte channel. In case of file systems, this is the raw SeekableByteChannel as returned by the provider. In case of zip files, we wrap the InputStream using WrappedSeekableByteChannel (which is a read only byte channel for now).- Parameters:
path- Pathoptions- OpenOption- Returns:
- a new seekabel byte channel
- Throws:
IOException-
-
get
Return a path based on a varargs list of path components. Each path component is separated by the file separator.- Parameters:
first-more-- Returns:
- Path
- Throws:
IOException-
-
get
Return a path based on a varargs list of path components. Each path component is separated by the file separator.- Parameters:
createParent- If this is true, we create the parent automatically when requesting the pathfirst-more-- Returns:
- Path
- Throws:
IOException-
-
get
- Parameters:
uriPathOrDefautFilePath-- Returns:
- Path
- Throws:
IOException-
-
get
Return a path based on the full URI representation of the path.- Parameters:
uriPathOrDefautFilePath-createParent- If this is true, we create the parent automatically when requesting the path- Returns:
- Path
- Throws:
IOException-
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-