Class PackExt


  • public class PackExt
    extends java.lang.Object
    A pack file extension.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PackExt​(java.lang.String ext, int pos)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getBit()
      Get the bit mask of the extension e.g 1 << getPosition().
      java.lang.String getExtension()
      Get the file extension.
      int getPosition()
      Get the position of the extension in the values array.
      static PackExt newPackExt​(java.lang.String ext)
      Returns a PackExt for the file extension and registers it in the values array.
      java.lang.String toString()
      static PackExt[] values()
      Get all of the PackExt values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • VALUES

        private static volatile PackExt[] VALUES
      • PACK

        public static final PackExt PACK
        A pack file extension.
      • INDEX

        public static final PackExt INDEX
        A pack index file extension.
      • KEEP

        public static final PackExt KEEP
        A keep pack file extension.
      • BITMAP_INDEX

        public static final PackExt BITMAP_INDEX
        A pack bitmap index file extension.
      • REFTABLE

        public static final PackExt REFTABLE
        A reftable file.
      • ext

        private final java.lang.String ext
      • pos

        private final int pos
    • Constructor Detail

      • PackExt

        private PackExt​(java.lang.String ext,
                        int pos)
    • Method Detail

      • values

        public static PackExt[] values()
        Get all of the PackExt values.
        Returns:
        all of the PackExt values.
      • newPackExt

        public static PackExt newPackExt​(java.lang.String ext)
        Returns a PackExt for the file extension and registers it in the values array.
        Parameters:
        ext - the file extension.
        Returns:
        the PackExt for the ext
      • getExtension

        public java.lang.String getExtension()
        Get the file extension.
        Returns:
        the file extension.
      • getPosition

        public int getPosition()
        Get the position of the extension in the values array.
        Returns:
        the position of the extension in the values array.
      • getBit

        public int getBit()
        Get the bit mask of the extension e.g 1 << getPosition().
        Returns:
        the bit mask of the extension e.g 1 << getPosition().
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object