Class FileHelper

java.lang.Object
com.ardor3d.extension.model.util.FileHelper

public class FileHelper extends Object
  • Constructor Details

    • FileHelper

      public FileHelper()
  • Method Details

    • isStringPureAscii

      public boolean isStringPureAscii(String string)
      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

      public boolean isFilePureAscii(String filename)
      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

      public boolean isFilePureAscii(ResourceSource resource)
      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.