blob: 1a7b7fb0678f8d00a3278cf019ad3117cc7974b9 [file] [log] [blame]
Richard S. Hall70b28fb2006-10-18 22:05:15 +00001/*
2 * $Header: /cvshome/build/ee.foundation/src/javax/microedition/io/HttpConnection.java,v 1.6 2006/03/14 01:20:29 hargrave Exp $
3 *
4 * (C) Copyright 2001 Sun Microsystems, Inc.
5 * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20package javax.microedition.io;
21public abstract interface HttpConnection extends javax.microedition.io.ContentConnection {
22 public abstract long getDate() throws java.io.IOException;
23 public abstract long getExpiration() throws java.io.IOException;
24 public abstract java.lang.String getFile();
25 public abstract java.lang.String getHeaderField(int var0) throws java.io.IOException;
26 public abstract java.lang.String getHeaderField(java.lang.String var0) throws java.io.IOException;
27 public abstract long getHeaderFieldDate(java.lang.String var0, long var1) throws java.io.IOException;
28 public abstract int getHeaderFieldInt(java.lang.String var0, int var1) throws java.io.IOException;
29 public abstract java.lang.String getHeaderFieldKey(int var0) throws java.io.IOException;
30 public abstract java.lang.String getHost();
31 public abstract long getLastModified() throws java.io.IOException;
32 public abstract int getPort();
33 public abstract java.lang.String getProtocol();
34 public abstract java.lang.String getQuery();
35 public abstract java.lang.String getRef();
36 public abstract java.lang.String getRequestMethod();
37 public abstract java.lang.String getRequestProperty(java.lang.String var0);
38 public abstract int getResponseCode() throws java.io.IOException;
39 public abstract java.lang.String getResponseMessage() throws java.io.IOException;
40 public abstract java.lang.String getURL();
41 public abstract void setRequestMethod(java.lang.String var0) throws java.io.IOException;
42 public abstract void setRequestProperty(java.lang.String var0, java.lang.String var1) throws java.io.IOException;
43 public final static java.lang.String GET = "GET";
44 public final static java.lang.String HEAD = "HEAD";
45 public final static java.lang.String POST = "POST";
46 public final static int HTTP_ACCEPTED = 202;
47 public final static int HTTP_BAD_GATEWAY = 502;
48 public final static int HTTP_BAD_METHOD = 405;
49 public final static int HTTP_BAD_REQUEST = 400;
50 public final static int HTTP_CLIENT_TIMEOUT = 408;
51 public final static int HTTP_CONFLICT = 409;
52 public final static int HTTP_CREATED = 201;
53 public final static int HTTP_ENTITY_TOO_LARGE = 413;
54 public final static int HTTP_EXPECT_FAILED = 417;
55 public final static int HTTP_FORBIDDEN = 403;
56 public final static int HTTP_GATEWAY_TIMEOUT = 504;
57 public final static int HTTP_GONE = 410;
58 public final static int HTTP_INTERNAL_ERROR = 500;
59 public final static int HTTP_LENGTH_REQUIRED = 411;
60 public final static int HTTP_MOVED_PERM = 301;
61 public final static int HTTP_MOVED_TEMP = 302;
62 public final static int HTTP_MULT_CHOICE = 300;
63 public final static int HTTP_NO_CONTENT = 204;
64 public final static int HTTP_NOT_ACCEPTABLE = 406;
65 public final static int HTTP_NOT_AUTHORITATIVE = 203;
66 public final static int HTTP_NOT_FOUND = 404;
67 public final static int HTTP_NOT_IMPLEMENTED = 501;
68 public final static int HTTP_NOT_MODIFIED = 304;
69 public final static int HTTP_OK = 200;
70 public final static int HTTP_PARTIAL = 206;
71 public final static int HTTP_PAYMENT_REQUIRED = 402;
72 public final static int HTTP_PRECON_FAILED = 412;
73 public final static int HTTP_PROXY_AUTH = 407;
74 public final static int HTTP_REQ_TOO_LONG = 414;
75 public final static int HTTP_RESET = 205;
76 public final static int HTTP_SEE_OTHER = 303;
77 public final static int HTTP_TEMP_REDIRECT = 307;
78 public final static int HTTP_UNAUTHORIZED = 401;
79 public final static int HTTP_UNAVAILABLE = 503;
80 public final static int HTTP_UNSUPPORTED_RANGE = 416;
81 public final static int HTTP_UNSUPPORTED_TYPE = 415;
82 public final static int HTTP_USE_PROXY = 305;
83 public final static int HTTP_VERSION = 505;
84}
85