public class MimeTypeDetector extends Object
Constructor and Description |
---|
MimeTypeDetector() |
Modifier and Type | Method and Description |
---|---|
String |
detect(byte[] content) |
String |
detect(byte[] content,
int length) |
String |
detect(InputStream is) |
boolean |
isGzip(String mimeType) |
boolean |
isText(String mimeType) |
boolean |
isXml(String mimeType) |
String |
normalize(String contentType,
byte[] content) |
public String detect(byte[] content)
public String detect(byte[] content, int length)
public String detect(InputStream is) throws IOException
IOException
public boolean isXml(String mimeType)
public boolean isText(String mimeType)
public boolean isGzip(String mimeType)
Copyright © 2009–2021 Crawler-Commons. All rights reserved.