|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.hul.ois.jhove.MacStuff
public class MacStuff
Code specific to Macintosh Java. This class consists of static methods, and should not be instantiated. Its methods should be called only on the Macintosh OS X platform. It requires the package com.apple.eio.FileManager.
Method Summary | |
---|---|
static boolean |
fileHasType(java.io.File file,
java.lang.String type)
Returns true if a file has the given file type. |
static boolean |
isMacintosh()
Determines if we're running on a Macintosh, so appropriate UI adjustments can be made. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isMacintosh()
public static boolean fileHasType(java.io.File file, java.lang.String type) throws java.lang.ClassNotFoundException
try {
if (sig.getType() == SignatureType.FILETYPE &&
MacStuff.isMacintosh ()) {
if (!MacStuff.fileHasType(file, sig.getValueString())) {
info.setConsistent (false);
}
}
}
catch (ClassNotFoundException e) {
// Mac classes missing -- can't check filetype.
}
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |