net.sourceforge.wopa.picture
枚举 PictureSaver.PictureType

java.lang.Object
  继承者 java.lang.Enum<PictureSaver.PictureType>
      继承者 net.sourceforge.wopa.picture.PictureSaver.PictureType
所有已实现的接口:
java.io.Serializable, java.lang.Comparable<PictureSaver.PictureType>
正在封闭类:
PictureSaver

public static enum PictureSaver.PictureType
extends java.lang.Enum<PictureSaver.PictureType>

根据图片类型指定其后缀名

作者:
Li Rui

枚举常量摘要
BMP
           
GIF
           
JPEG
           
PNG
           
 
字段摘要
private  java.lang.String content_type
           
private  java.lang.String surfix
           
 
方法摘要
static PictureSaver.PictureType getByContentType(java.lang.String content_type)
          根据content_type获取图片类型
 java.lang.String getContentType()
          获取文件类型
 java.lang.String getSurfix()
          获取后缀名
static PictureSaver.PictureType valueOf(java.lang.String name)
          返回带有指定名称的该类型的枚举常量。
static PictureSaver.PictureType[] values()
          按照声明该枚举类型的常量的顺序,返回 包含这些常量的数组。
 
从类 java.lang.Enum 继承的方法
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
从类 java.lang.Object 继承的方法
finalize, getClass, notify, notifyAll, wait, wait, wait
 

枚举常量详细信息

JPEG

public static final PictureSaver.PictureType JPEG

BMP

public static final PictureSaver.PictureType BMP

GIF

public static final PictureSaver.PictureType GIF

PNG

public static final PictureSaver.PictureType PNG
字段详细信息

content_type

private java.lang.String content_type

surfix

private java.lang.String surfix
方法详细信息

values

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

返回:
按照声明该枚举类型的常量的顺序,返回 包含这些常量的数组。

valueOf

public static PictureSaver.PictureType valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格。)

参数:
指定要返回的枚举常量的名称。 -
返回:
返回带有指定名称的枚举常量
抛出:
如果该枚举类型没有带有指定名称的常量, - 则抛出 IllegalArgumentException

getSurfix

public java.lang.String getSurfix()
获取后缀名

返回:

getContentType

public java.lang.String getContentType()
获取文件类型

返回:

getByContentType

public static PictureSaver.PictureType getByContentType(java.lang.String content_type)
根据content_type获取图片类型

参数:
content_type -
返回: