-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
toString() now returns the content type
- Loading branch information
Showing
2 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* ao-encoding - High performance streaming character encoding. | ||
* Copyright (C) 2009, 2010, 2011, 2013, 2015, 2016, 2018, 2019, 2020 AO Industries, Inc. | ||
* Copyright (C) 2009, 2010, 2011, 2013, 2015, 2016, 2018, 2019, 2020, 2021 AO Industries, Inc. | ||
* [email protected] | ||
* 7262 Bull Pen Cir | ||
* Mobile, AL 36695 | ||
|
@@ -33,7 +33,6 @@ | |
* | ||
* @author AO Industries, Inc. | ||
*/ | ||
// TODO: Add toString method of the contentType | ||
public enum MediaType { | ||
|
||
/** | ||
|
@@ -216,6 +215,15 @@ private MediaType(String contentType) { | |
this.contentType = contentType; | ||
} | ||
|
||
/** | ||
* Delegates to {@link #getContentType()}. | ||
*/ | ||
@Override | ||
public String toString() { | ||
return getContentType(); | ||
} | ||
|
||
|
||
abstract boolean isUsedFor(String contentType); | ||
|
||
/** | ||
|