|
Oracle® Fusion Middleware Content Integration Suite (CIS) Java API Reference 11g Release 1 (11.1) E17350-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.stellent.cis.common.util.PathHelper
public class PathHelper
Field Summary | |
---|---|
static java.lang.String |
BACKWARD_SLASH_STRING |
protected static char |
CHAR_QUOTE |
protected static char |
CHAR_SPACE |
protected static char |
FORWARD_SLASH |
static java.lang.String |
FORWARD_SLASH_STRING |
protected static java.lang.String |
PATH_CHARS |
static java.lang.String |
PROTOCOL_MARK |
protected static java.lang.String |
STR_QUOTE |
Constructor Summary | |
---|---|
PathHelper() |
Method Summary | |
---|---|
static java.lang.String |
appendPath(java.lang.String dirName, java.lang.String filePath) |
static java.lang.String |
ensureForwardSlashes(java.lang.String path) Changes backward slashes to forward slashes. |
static java.lang.String |
ensureNoProtocolInPath(java.lang.String path) Ensure the path does not start with a protocol specification For example: aaa --> aaa file:/aaa --> aaa file:/aaa/bbb/ccc --> aaa/bbb/ccc /aaa/bbb/ccc --> aaa/bbb/ccc / --> / null --> null |
static java.lang.String |
ensureStartingSlash(java.lang.String path) Ensure the path starts with a slash For example: aaa --> /aaa aaa/ --> /aaa/ aaa/bbb/ccc --> /aaa/bbb/ccc /aaa/bbb/ccc --> /aaa/bbb/ccc / --> / null --> null |
static java.lang.String |
ensureTrailingSlash(java.lang.String path) Ensure the path ends with a slash For example: aaa --> aaa/ /aaa --> /aaa/ aaa/bbb/ccc --> /aaa/bbb/ccc/ /aaa/bbb/ccc --> /aaa/bbb/ccc/ / --> / null --> null |
static java.lang.String |
getDirectoryPath(java.lang.String filepath) Returns folder path for a file location |
static java.lang.String |
getFirstPathSegment(java.lang.String path) Parse first segment out of a path For example: aaa/bbb/ccc --> aaa /aaa/bbb/ccc --> aaa / --> null null --> null |
static java.lang.String |
getFirstPathSegment(java.lang.String path, char separator) |
static java.lang.String |
getLastPathSegment(java.lang.String path) Parse last segment out of a path For example: aaa/bbb/ccc --> ccc aaa/bbb/ccc/ --> ccc / --> null null --> null |
static java.lang.String |
getPathSegment(java.lang.String path, int segment, boolean fromStart) Returns the specified path segment. |
static boolean |
hasProtocolInPath(java.lang.String path) Checks whether the path has a protocol specification |
static boolean |
isLongFileName(java.lang.String fileName) Checks wether given file name is long file name. |
static boolean |
isPathAbsolute(java.lang.String path) Determines if the given path is absolute or relative. |
static java.lang.String |
justFileName(java.lang.String fullFilePath) Returns just file name from the specified full file path |
static java.util.ArrayList |
makeMaskList(java.util.ArrayList folderList, java.lang.String extension) |
static java.lang.String |
normalizePath(java.lang.String filePath) |
static java.lang.String |
quotePath(java.lang.String filePath) |
static java.lang.String |
removeStartingSlash(java.lang.String path) Remove the beginning slash from the given path. |
static java.lang.String |
removeTrailingSlash(java.lang.String path) Remove the ending slash from the given path. |
static java.lang.String |
setFileExt(java.lang.String filepath, java.lang.String extencion) Replaces current filepath extencion |
static java.lang.String |
stripFirstSegment(java.lang.String path) Strip first segment out of a path For example: aaa --> null aaa/ --> null aaa/bbb/ccc --> bbb/ccc aaa/bbb/ccc/ --> /bbb/ccc/ / --> null null --> null |
static java.lang.String |
stripFirstSegment(java.lang.String path, char separator) |
static java.lang.String |
stripLastSegment(java.lang.String path) Strip last segment out of a path For example: aaa --> null aaa/ --> null aaa/bbb/ccc --> aaa/bbb/ /aaa/bbb/ccc --> /aaa/bbb/ / --> null null --> null |
static java.lang.String |
stripLastSegment(java.lang.String path, char separator) |
static java.lang.String |
stripPath(java.lang.String path) Ensure the path does not start or end with slash For example: aaa --> aaa /aaa --> aaa aaa/bbb/ccc --> aaa/bbb/ccc /aaa/bbb/ccc --> aaa/bbb/ccc / --> null null --> null |
static java.lang.String |
stripPath(java.lang.String path, char separator) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROTOCOL_MARK
public static final java.lang.String FORWARD_SLASH_STRING
public static final java.lang.String BACKWARD_SLASH_STRING
protected static final char FORWARD_SLASH
protected static final char CHAR_SPACE
protected static final char CHAR_QUOTE
protected static final java.lang.String STR_QUOTE
protected static final java.lang.String PATH_CHARS
Constructor Detail |
---|
public PathHelper()
Method Detail |
---|
public static java.lang.String getFirstPathSegment(java.lang.String path)
null
null
--> null
public static java.lang.String getFirstPathSegment(java.lang.String path, char separator)
path
-separator
- is the sepataorgetFirstPathSegment(java.lang.String)
public static java.lang.String getLastPathSegment(java.lang.String path)
null
null
--> null
public static java.lang.String getPathSegment(java.lang.String path, int segment, boolean fromStart)
null
null
--> null
public static java.lang.String stripFirstSegment(java.lang.String path)
null
null
null
null
--> null
public static java.lang.String stripFirstSegment(java.lang.String path, char separator)
stripFirstSegment(java.lang.String)
public static java.lang.String stripLastSegment(java.lang.String path)
null
null
null
null
--> null
public static java.lang.String stripLastSegment(java.lang.String path, char separator)
path
-separator
- the sepatator of the pathstripLastSegment(java.lang.String)
public static java.lang.String ensureStartingSlash(java.lang.String path)
null
--> null
public static java.lang.String ensureTrailingSlash(java.lang.String path)
null
--> null
public static java.lang.String stripPath(java.lang.String path)
null
null
--> null
public static java.lang.String stripPath(java.lang.String path, char separator)
path
-separator
- is the separatorstripPath(java.lang.String)
public static boolean isPathAbsolute(java.lang.String path)
path
- the path to examinepublic static java.lang.String removeStartingSlash(java.lang.String path)
path
- the path to examinepublic static java.lang.String removeTrailingSlash(java.lang.String path)
path
- the path to examinepublic static java.lang.String ensureNoProtocolInPath(java.lang.String path)
null
--> null
public static boolean hasProtocolInPath(java.lang.String path)
path
- Path to be searched for presence of s protocol specifiernull
--> falsepublic static java.lang.String ensureForwardSlashes(java.lang.String path)
path
- string to modifypublic static java.lang.String getDirectoryPath(java.lang.String filepath)
filepath
- is path to a filepublic static java.lang.String setFileExt(java.lang.String filepath, java.lang.String extencion)
filepath
- is path to a filepublic static java.lang.String justFileName(java.lang.String fullFilePath)
public static java.lang.String appendPath(java.lang.String dirName, java.lang.String filePath)
public static java.lang.String normalizePath(java.lang.String filePath)
filePath
-public static java.util.ArrayList makeMaskList(java.util.ArrayList folderList, java.lang.String extension)
public static java.lang.String quotePath(java.lang.String filePath)
public static boolean isLongFileName(java.lang.String fileName)
fileName
-
|
Oracle® Fusion Middleware Content Integration Suite (CIS) Java API Reference 11g Release 1 (11.1) E17350-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |