|
||||||||||
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 java.net.URL |
createCachedImage(java.lang.String base64String)
Saves an image to a cache directory and returns its URL |
static java.net.URL |
createCachedImage(java.lang.String base64String,
java.lang.String fileName)
Saves an image to a cache directory and returns its URL |
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 |
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 |
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 getUniqueID()
public static java.lang.String getExtension(java.io.File f)
f
- file to get the extension from
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 java.net.URL createCachedImage(java.lang.String base64String)
base64String
- image as base64 string
public static java.net.URL createCachedImage(java.lang.String base64String, java.lang.String fileName)
base64String
- image as Base64 stringfileName
- cache filename
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 |