public class MimetypeUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NO_TYPE_MIMETYPE
The 'no-type' content-type.
|
protected static Pattern |
TRUNCATION_REGEX
Truncation regex.
|
| Constructor and Description |
|---|
MimetypeUtils() |
public static final String NO_TYPE_MIMETYPE
protected static final Pattern TRUNCATION_REGEX
public static String truncate(String contentType)
Truncate at delimiters [;, ]. Truncate multi-part content type header at ';'. Apache httpclient collapses values of multiple instances of the header into one comma-separated value,therefore truncated at ','. Current ia_tools that work with arc files expect 5-column space-separated meta-lines, therefore truncate at ' '.
contentType - Raw content-type.Copyright © 2015 The International Internet Preservation Consortium. All Rights Reserved.