Results 1 to 1 of 1
-
Getting content type from a website
Content types are used to inform the kind of file that is being transmitted over the Web. Few examples of content types are: text/plain, text/html, image/jpeg, video/quicktime etc.
Following code gets content type from a web:
Output:Java Code:URL u = new URL("http://www.yahoo.com"); URLConnection uc = u.openConnection( ); System.out.println("Content-type: " + uc.getContentType( ));
Java Code:Content-type: text/html; charset=utf-8
Similar Threads
-
Kode Java Website
By wsaryada in forum Reviews / AdvertisingReplies: 4Last Post: 01-18-2008, 09:16 PM -
website java button layout
By abcdefg in forum AWT / SwingReplies: 0Last Post: 12-25-2007, 04:44 PM -
Connecting to a Website with the default browser
By Riftwalker in forum Java AppletsReplies: 4Last Post: 12-04-2007, 04:57 PM -
Getting character set from a website
By Java Tip in forum Java TipReplies: 0Last Post: 11-26-2007, 12:53 PM -
How do i read from a website with a certificate??
By karl in forum Advanced JavaReplies: 0Last Post: 07-12-2007, 04:25 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks