source: trunk/greenstone3-extensions/gs3build/src/org/greenstone/gsdl3/gs3build/util/HTTPTools.java@ 12188

Last change on this file since 12188 was 12188, checked in by kjdon, 18 years ago

Initial revision

  • Property svn:keywords set to Author Date Id Revision
File size: 452 bytes
Line 
1package org.greenstone.gsdl3.gs3build.util;
2
3import java.io.IOException;
4import java.net.*;
5
6public class HTTPTools
7{
8 public static String getMIMEType(URL url)
9 { try
10 { // initiate the connection
11 URLConnection connection = url.openConnection();
12
13 connection.connect(); // actually make the connection
14
15 return connection.getContentType();
16 }
17 catch (IOException exception)
18 { // TODO: Log error reading url here...
19 }
20 return null;
21 }
22}
Note: See TracBrowser for help on using the repository browser.