public class MimetypeUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NO_TYPE_MIMETYPE
The 'no-type' content-type.
|
protected static java.util.regex.Pattern |
TRUNCATION_REGEX
Truncation regex.
|
| Constructor and Description |
|---|
MimetypeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
truncate(java.lang.String contentType)
Truncate passed mimetype.
|
public static final java.lang.String NO_TYPE_MIMETYPE
protected static final java.util.regex.Pattern TRUNCATION_REGEX
public static java.lang.String truncate(java.lang.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 © 2019 The International Internet Preservation Consortium. All Rights Reserved.