Class TextUtil
java.lang.Object
org.exoplatform.services.jcr.webdav.util.TextUtil
Created by The eXo Platform SAS.
- Version:
- $Id: PutCommand.java 12004 2007-01-17 12:03:57Z geaz $
- Author:
- Vitaly Guly - gavrikvetal@gmail.com
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringEscapes string using escape symbol.static StringgetExtension(String filename) Extracts the extension of the file.static booleanisMediaFile(String mimeType) Checks if Mime-Type is media mime type.static StringCuts the current name from the path.static StringparentPath(String path) static StringCuts the path from string.static StringrelativizePath(String path) Creates relative path from string.static StringrelativizePath(String path, boolean withIndex) Creates relative path from string.static StringremoveIndexFromPath(String path) Removes the index from the path if it has an index definedstatic StringUnescapes string using escape symbol.
-
Field Details
-
URISave
-
URISaveEx
-
hexTable
public static final char[] hexTableHexademical characters.
-
-
Constructor Details
-
TextUtil
public TextUtil()
-
-
Method Details
-
unescape
Unescapes string using escape symbol.- Parameters:
string- stringescape- escape symbol- Returns:
- unescaped string
-
escape
Escapes string using escape symbol.- Parameters:
string- stringescape- escape symbolisPath- if the string is path- Returns:
- escaped string
-
relativizePath
Creates relative path from string.- Parameters:
path- path- Returns:
- relative path
-
relativizePath
Creates relative path from string.- Parameters:
path- pathwithIndex- indicates whether we should keep the index or not- Returns:
- relative path
-
removeIndexFromPath
Removes the index from the path if it has an index defined -
pathOnly
Cuts the path from string.- Parameters:
path- full path- Returns:
- relative path.
-
parentPath
- Parameters:
path- path- Returns:
- parentPath
-
nameOnly
Cuts the current name from the path.- Parameters:
path- path- Returns:
- current name
-
isMediaFile
Checks if Mime-Type is media mime type.- Parameters:
mimeType- Mime-Type- Returns:
- true if is media false if not.
-
getExtension
Extracts the extension of the file.- Parameters:
filename- file name- Returns:
- extension or emtpy string if file has no extension
-