---
title: "Light-Commons 加入 MimeType 枚举类型"
author: "jasongreen"
date: "2008-06-24T18:04:56Z"
tags: ["Excel", "Java"]
slug: "light-commons-mimetype"
draft: false
lastmod: "2008-06-24T18:04:56Z"
id: 207618
url: "https://jasongreen.iteye.com/blog/207618"
---

HTTP 协议中的 MimeType 有很多，难以记忆和查找。现在light-commons加入了MimeType的枚举，包含了137种常见MimeType，只需要输入文件扩展名，即可获得ContentType


```java
assertEquals("application/vnd.ms-excel",""+MimeType.XLS);
assertEquals("audio/x-wav",""+MimeType.WAV);
```