Package picard.nio
Class PicardHtsPath
java.lang.Object
htsjdk.io.HtsPath
picard.nio.PicardHtsPath
- All Implemented Interfaces:
htsjdk.io.IOPath
,Serializable
public class PicardHtsPath
extends htsjdk.io.HtsPath
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPicardHtsPath
(htsjdk.io.HtsPath htsPath) Create a PicardHtsPath from an existingHtsPath
or subclass.PicardHtsPath
(File file) Create a PicardHtsPath from aFile
reference.PicardHtsPath
(String rawInputString) Create a PicardHtsPath from a raw input path string. -
Method Summary
Modifier and TypeMethodDescriptionstatic PicardHtsPath
Construct aPicardHtsPath
from aPath
static List<PicardHtsPath>
fromPaths
(Collection<String> paths) Create aList<PicardHtsPath>
from path representations.toPath()
Resolve the URI of this object to aPath
object.toPaths
(Collection<PicardHtsPath> picardHtsPaths) Create aList<Path>
fromPicardHtsPath
sMethods inherited from class htsjdk.io.HtsPath
equals, getCachedPath, getInputStream, getOutputStream, getRawInputString, getToPathFailureReason, getURI, getURIString, hasFileSystemProvider, hashCode, isPath, setCachedPath, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface htsjdk.io.IOPath
getBaseName, getExtension, getScheme, hasExtension, isBam, isCram, isFasta, isSam
-
Constructor Details
-
PicardHtsPath
Create a PicardHtsPath from a raw input path string.If the raw input string already contains a scheme (including a "file" scheme), assume its already properly escape/encoded. If no scheme component is present, assume it references a raw path on the local file system, so try to get a Path first, and then retrieve the URI from the resulting Path. This ensures that input strings that are local file references without a scheme component and contain embedded characters are valid in file names, but which would otherwise be interpreted as excluded URI characters (such as the URI fragment delimiter "#") are properly escape/encoded.
- Parameters:
rawInputString
- a string specifying an input path. May not be null.
-
PicardHtsPath
public PicardHtsPath(htsjdk.io.HtsPath htsPath) Create a PicardHtsPath from an existingHtsPath
or subclass.- Parameters:
htsPath
- an existing PathSpecifier. May not be null.
-
PicardHtsPath
Create a PicardHtsPath from aFile
reference. Uses the URI string offile
.- Parameters:
file
- the file reference to create this object from
-
-
Method Details
-
fromPaths
Create aList<PicardHtsPath>
from path representations.- Parameters:
paths
- URIs or local paths. May not be null but may be empty.- Returns:
- the converted
List
-
toPath
Resolve the URI of this object to aPath
object.- Specified by:
toPath
in interfacehtsjdk.io.IOPath
- Overrides:
toPath
in classhtsjdk.io.HtsPath
- Returns:
- the resulting
Path
- Throws:
RuntimeException
- if an I/O error occurs when creating the file system
-
fromPath
Construct aPicardHtsPath
from aPath
- Parameters:
path
- may NOT be null- Returns:
- a new object representing path
-
toPaths
Create aList<Path>
fromPicardHtsPath
s- Parameters:
picardHtsPaths
- may NOT be null- Returns:
- Path representations of the input picardHtsPaths
-