MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / guessMimeType

Method guessMimeType

src/tsd/HttpQuery.java:709–712  ·  view source on GitHub ↗

Returns the result of an attempt to guess the MIME type of the response. @param buf The content of the reply to send.

(final ChannelBuffer buf)

Source from the content-addressed store, hash-verified

707 * @param buf The content of the reply to send.
708 */
709 private String guessMimeType(final ChannelBuffer buf) {
710 final String mimetype = guessMimeTypeFromUri(request().getUri());
711 return mimetype == null ? guessMimeTypeFromContents(buf) : mimetype;
712 }
713
714 /**
715 * Attempts to guess the MIME type by looking at the URI requested.

Callers 1

sendBufferMethod · 0.95

Calls 3

guessMimeTypeFromUriMethod · 0.95
requestMethod · 0.45

Tested by

no test coverage detected