int length = conn.getContentLength() / 1024;
response = String.format("HTTP %s: %s", conn.getResponseCode(), conn.getResponseMessage());
String info;
if (type.contains("text") || type.contains("application")) {
Document doc = Jsoup.connect(link).userAgent(USER_AGENT).followRedirects(true).get();
String title = doc.title() == null || doc.title().isEmpty() ? "No title found!" : doc.title();
info = String.format("%s - (Content Type: %s Size: %skb)", title, type, length);
return info;
}
info = String.format("Content Type: %s Size: %skb", type, length);
return info;