枚举 FileTypeEnum

  • 所有已实现的接口:
    java.io.Serializable, java.lang.Comparable<FileTypeEnum>

    public enum FileTypeEnum
    extends java.lang.Enum<FileTypeEnum>
    Config file type enum.
    作者:
    klw
    • 枚举常量概要

      枚举常量 
      枚举常量 说明
      HTM
      Html file.
      HTML
      Html file.
      JSON
      Json file.
      PROPERTIES
      Properties file.
      TEXT
      Text file.
      TXT
      Text file.
      XML
      Xml file.
      YAML
      Yaml file.
      YML
      Yaml file.
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      private java.lang.String contentType
      Http Content type corresponding to file extension.
      private java.lang.String fileType
      File type corresponding to file extension.
      private static FileTypeEnum[] VALUES  
    • 构造器概要

      构造器 
      限定符 构造器 说明
      private FileTypeEnum​(java.lang.String fileType)  
      private FileTypeEnum​(java.lang.String fileType, java.lang.String contentType)  
    • 方法概要

      所有方法 静态方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      java.lang.String getContentType()  
      java.lang.String getFileType()  
      static FileTypeEnum getFileTypeEnumByFileExtensionOrFileType​(java.lang.String extOrFileType)
      Get the corresponding FileTypeEnum by file extension or fileType.
      static FileTypeEnum valueOf​(java.lang.String name)
      返回带有指定名称的该类型的枚举常量。
      static FileTypeEnum[] values()
      按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
      • 从类继承的方法 java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • 从类继承的方法 java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 字段详细资料

      • fileType

        private java.lang.String fileType
        File type corresponding to file extension.
      • contentType

        private java.lang.String contentType
        Http Content type corresponding to file extension.
    • 构造器详细资料

      • FileTypeEnum

        private FileTypeEnum​(java.lang.String fileType)
      • FileTypeEnum

        private FileTypeEnum​(java.lang.String fileType,
                             java.lang.String contentType)
    • 方法详细资料

      • values

        public static FileTypeEnum[] values()
        按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:
        for (FileTypeEnum c : FileTypeEnum.values())
            System.out.println(c);
        
        返回:
        按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
      • valueOf

        public static FileTypeEnum valueOf​(java.lang.String name)
        返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
        参数:
        name - 要返回的枚举常量的名称。
        返回:
        返回带有指定名称的枚举常量
        抛出:
        java.lang.IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量
        java.lang.NullPointerException - 如果参数为空值
      • getFileType

        public java.lang.String getFileType()
      • getContentType

        public java.lang.String getContentType()
      • getFileTypeEnumByFileExtensionOrFileType

        public static FileTypeEnum getFileTypeEnumByFileExtensionOrFileType​(java.lang.String extOrFileType)
        Get the corresponding FileTypeEnum by file extension or fileType. If not found FileTypeEnum.TEXT is returned
        参数:
        extOrFileType - file extension or fileType
        返回: