Last change
on this file since 6498 was 5800, checked in by cs025, 21 years ago |
Adding gs3build
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
452 bytes
|
Line | |
---|
1 | package org.greenstone.gsdl3.gs3build.util;
|
---|
2 |
|
---|
3 | import java.io.IOException;
|
---|
4 | import java.net.*;
|
---|
5 |
|
---|
6 | public 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.