Package com.ardor3d.extension.model.util
Class FileHelper
java.lang.Object
com.ardor3d.extension.model.util.FileHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isFilePureAscii
(ResourceSource resource) Tests whether or not the file with the specified filename is pure ASCII.boolean
isFilePureAscii
(String filename) Tests whether or not the file with the specified filename is pure ASCII.boolean
isStringPureAscii
(String string) Tests whether or not the specified string is pure ASCII.
-
Constructor Details
-
FileHelper
public FileHelper()
-
-
Method Details
-
isStringPureAscii
Tests whether or not the specified string is pure ASCII. Uses the method discussed at:http://www.rgagnon.com/javadetails/java-0536.html http://stackoverflow.com/questions/3585053/in-java-is-it-possible-to-check-if-a-string-is-only-ascii
- Parameters:
string
- String to test.- Returns:
- Logical-true if pure ASCII, else logical-false.
-
isFilePureAscii
Tests whether or not the file with the specified filename is pure ASCII. The method used is to read the file a line at a time and test if each line is ASCII.- Parameters:
filename
- File name.- Returns:
- Logical-true if pure ASCII, else logical-false.
-
isFilePureAscii
Tests whether or not the file with the specified filename is pure ASCII. The method used is to read the file a line at a time and test if each line is ASCII.- Parameters:
resource
- the name of the resource to find.- Returns:
- Logical-true if pure ASCII, else logical-false.
-