001package org.jsoup; 002 003import java.io.IOException; 004 005/** 006 * Signals that a HTTP response returned a mime type that is not supported. 007 */ 008public class UnsupportedMimeTypeException extends IOException { 009 private String mimeType; 010 private String url; 011 012 public UnsupportedMimeTypeException(String message, String mimeType, String url) { 013 super(message); 014 this.mimeType = mimeType; 015 this.url = url; 016 } 017 018 public String getMimeType() { 019 return mimeType; 020 } 021 022 public String getUrl() { 023 return url; 024 } 025 026 @Override 027 public String toString() { 028 return super.toString() + ". Mimetype=" + mimeType + ", URL="+url; 029 } 030}