Java Content Type Get getContentType(String fileName)

Here you can find the source of getContentType(String fileName)

Description

get Content Type

License

Apache License

Declaration

public static String getContentType(String fileName) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.net.URLConnection;

public class Main {

    public static String getContentType(String fileName) {
        return URLConnection.guessContentTypeFromName(fileName);
    }//from w ww . j  a va 2 s .  c o m
}

Related

  1. getContentType(final File file)
  2. getContentType(final String filename)
  3. getContentType(String boundary)
  4. getContentType(String file)
  5. getContentType(String filename)
  6. getContentType(String name)