Class TarTransFileTyper


  • public class TarTransFileTyper
    extends java.lang.Object
    This interface indicates if a file qualifies for ASCII translation. To support customization of TAR translation, this interface allows the programmer to provide an object that will check files that do not match the MIME types file's check for 'text/*' types. To provide your own typer, subclass this class and set the TarArchive's TransFileTyper via the method setTransFileTyper().
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isAsciiFile​(java.io.File f)
      Return true if the file should be translated as ASCII.
      boolean isAsciiFile​(java.lang.String name)
      Return true if the file should be translated as ASCII based on its name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TarTransFileTyper

        public TarTransFileTyper()
    • Method Detail

      • isAsciiFile

        public boolean isAsciiFile​(java.io.File f)
        Return true if the file should be translated as ASCII.
        Parameters:
        f - The file to be checked to see if it need ASCII translation.
      • isAsciiFile

        public boolean isAsciiFile​(java.lang.String name)
        Return true if the file should be translated as ASCII based on its name. The file DOES NOT EXIST. This is called during extract, so all we know is the file name.
        Parameters:
        name - The name of the file to be checked to see if it need ASCII translation.