KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > internal > core > Response


1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.internal.core;
12
13 import java.io.*;
14
15 import org.eclipse.core.runtime.*;
16
17 public interface Response {
18
19     /**
20      * Method getInputStream.
21      *
22      * @return InputStream
23      */

24     public InputStream getInputStream() throws IOException;
25
26     /**
27      * A special version of 'getInputStream' that can be canceled.
28      * A monitor thread checks the state of the monitor
29      * and disconnects the connection if 'isCanceled()' is detected.
30      *
31      * @param monitor
32      * the progress monitor
33      * @return InputStream an opened stream or null if failed.
34      * @throws IOException
35      * if there are problems
36      * @throws CoreException
37      * if no more connection threads are available
38      */

39     public InputStream getInputStream(IProgressMonitor monitor)
40         throws IOException, CoreException;
41
42     /**
43      * Method getContentLength.
44      *
45      * @return long
46      */

47     public long getContentLength();
48
49     /**
50      * Method getStatusCode.
51      *
52      * @return int
53      */

54     public int getStatusCode();
55
56     /**
57      * Method getStatusMessage.
58      *
59      * @return String
60      */

61     public String JavaDoc getStatusMessage();
62
63     /**
64      * Returns the timestamp of last modification to the resource
65      *
66      * @return
67      */

68     public long getLastModified();
69 }
70
Popular Tags