|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.umlv.unitex.Util
public class Util
This class provides methods to get information about files, like path, file name or extension.
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static java.lang.String |
getExtensionInLowerCase(java.io.File f)
Returns the extension in lower case of a file |
static java.lang.String |
getExtensionInLowerCase(java.lang.String s)
Returns the extension in lower case of a file |
static java.lang.String |
getFileNameExtension(java.io.File f)
Returns the extension of a file. |
static java.lang.String |
getFileNameExtension(java.lang.String s)
Returns the extension of a file. |
static java.lang.String |
getFileNameWithoutExtension(java.io.File f)
Returns the name without extension of a file. |
static java.lang.String |
getFileNameWithoutExtension(java.lang.String s)
Returns the name without extension of a file. |
static java.lang.String |
getFileNameWithoutFilePath(java.io.File f)
Returns the file name of a file, without the path. |
static java.lang.String |
getFileNameWithoutFilePath(java.lang.String s)
Returns the file name of a file, without the path. |
static java.lang.String |
getFilePathWithoutFileName(java.io.File f)
Returns the path name of a file, without the file name. |
static java.lang.String |
getFilePathWithoutFileName(java.lang.String s)
Returns the path name of a file, without the file name. |
static java.lang.String |
getHtmlPageTitle(java.io.File file)
Takes a file and looks for the text between the tags <title>
and </title> . |
static int |
toInt(java.lang.String s)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static java.lang.String getFileNameWithoutExtension(java.lang.String s)
s
- the file name
public static java.lang.String getFileNameWithoutExtension(java.io.File f)
f
- the file name
public static java.lang.String getFileNameExtension(java.lang.String s)
s
- the file name
public static java.lang.String getFileNameExtension(java.io.File f)
Util.getFileNameExtension(f.getName())
.
f
- the file
public static java.lang.String getFilePathWithoutFileName(java.lang.String s)
s
- the file name
public static java.lang.String getFilePathWithoutFileName(java.io.File f)
getFilePathWithoutFileName(f.getName())
.
f
- the file
public static java.lang.String getFileNameWithoutFilePath(java.io.File f)
f
- the file
public static java.lang.String getFileNameWithoutFilePath(java.lang.String s)
getFileNameWithoutFilePath(new File(s))
.
s
- the file name
public static java.lang.String getExtensionInLowerCase(java.lang.String s)
s
- file name
public static java.lang.String getExtensionInLowerCase(java.io.File f)
f
- the file
public static int toInt(java.lang.String s)
public static java.lang.String getHtmlPageTitle(java.io.File file)
<title>
and </title>
.
WARNING: the result string is taken rawly and
might be wrongly encoded if the title is not in ASCII.
file
- the HTML file
null
if the pattern is not found in the
first 200 bytes of the file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |