All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.core.TextDetection
java.lang.Object
|
+----com.sun.wizards.core.TextDetection
- public class TextDetection
- extends Object
The TextDetection class is used to determine if a file is a text file
or a binary file. A file is considered a text file if the line
separator string occurs within the file at intervals no farther
apart than 255 characters AND the file itself ends with the
line separator string.
This class is used by the native platform toolkits on the call
to getFileAttributes().
-
TextDetection()
-
-
isTextFile(File)
- Check the specified file to see if it is a text file.
-
main(String[])
- This method is used only to test the TextDetection class,
and will be removed in the future.
TextDetection
public TextDetection()
isTextFile
public static boolean isTextFile(File file)
- Check the specified file to see if it is a text file.
- Parameters:
- file - The file to check.
- Returns:
- true if the specified file is a text file.
main
public static void main(String args[])
- This method is used only to test the TextDetection class,
and will be removed in the future.
- Parameters:
- args - The file to check, in a String array.
All Packages Class Hierarchy This Package Previous Next Index