- Log in to post comments
// identificate filetyp in filestream
System.out.println(URLConnection.guessContentTypeFromStream(new URL("http://www.example.org/banner.jpg").openStream()));
// timestamp
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String timestamp = sdf.format(new Date());