@Override public String getContentType() { return contentType != null ? contentType : super.getContentType(); }
public String getContentType() { return contentType != null ? contentType : super.getContentType(); }
@Override public String getContentType() { return contentType != null ? contentType : super.getContentType(); }
public String getContentType() { if (this.contentType != null) { return contentType; } else { return super.getContentType(); } }
@Override public String getContentType() { return contentType != null ? contentType : super.getContentType(); }
@Override public String getContentType() { return contentType != null ? contentType : super.getContentType(); }
@Override public String getContentType() { return contentType != null ? contentType : super.getContentType(); }
@Override public String getContentType() { return contentType != null ? contentType : super.getContentType(); }
@Override public String getContentType() { return contentType != null ? contentType : super.getContentType(); }
import javax.activation.*; public class ShowMimeType { public static void main(String[] args) { FileDataSource ds = new FileDataSource(args[0]); String contentType = ds.getContentType(); System.out.println("The MIME type of the file " + args[0] + " is: " + contentType); } }