|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ext.util.Utilities
General utilities
Constructor Summary | |
Utilities()
|
Method Summary | |
static javax.swing.ImageIcon |
base64ToImage(java.lang.String base64)
|
static java.lang.String |
fileToBase64String(java.net.URL url)
Gets the content of a file and converts it to a base64 string |
static java.lang.String |
fillSubtitles(java.lang.String filePath,
java.lang.String subtitles)
|
static java.lang.String |
getCacheDirectory()
Returns the currently used cache directory |
static java.awt.Dimension |
getCenteredWindowLocation(java.awt.Dimension windowSize)
Returns a centered location for a window / form / dialog |
static java.lang.String |
getCompareStringForFile(java.net.URL url)
Retrieves the content of the file (first 100 bytes) so it can be compared with the content of another file |
static java.lang.String |
getCurrentDirectory()
|
static java.lang.String |
getExtension(java.io.File f)
Retrieved the file extension of a file |
static java.lang.String |
getHexColor(java.awt.Color color)
|
static int |
getIntegerValue(java.lang.String s)
|
static javax.swing.ImageIcon |
getRatingIcon(java.lang.Object value)
|
static java.lang.String |
getUniqueID()
Creates a unique ID. |
static byte[] |
readFile(java.io.File file)
Reads the content of a file (fully) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utilities()
Method Detail |
public static java.awt.Dimension getCenteredWindowLocation(java.awt.Dimension windowSize)
windowSize
- size of the window
public static java.lang.String fillSubtitles(java.lang.String filePath, java.lang.String subtitles)
public static java.lang.String getUniqueID()
public static java.lang.String getExtension(java.io.File f)
f
- file to get the extension from
public static int getIntegerValue(java.lang.String s)
public static java.lang.String getCompareStringForFile(java.net.URL url) throws java.lang.Exception
url
- url of the file to create the compare string for
java.lang.Exception
public static byte[] readFile(java.io.File file) throws java.lang.Exception
file
- file to retrieve the content from
java.lang.Exception
public static javax.swing.ImageIcon base64ToImage(java.lang.String base64)
public static java.lang.String getHexColor(java.awt.Color color)
public static javax.swing.ImageIcon getRatingIcon(java.lang.Object value)
public static java.lang.String getCacheDirectory()
public static java.lang.String getCurrentDirectory() throws java.lang.Exception
java.lang.Exception
public static java.lang.String fileToBase64String(java.net.URL url)
url
- url of file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |