KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > HTTPClient > GlobalConstants


1 /*
2  * @(#)GlobalConstants.java 0.3-2 18/06/1999
3  *
4  * This file is part of the HTTPClient package
5  * Copyright (C) 1996-1999 Ronald Tschalär
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free
19  * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20  * MA 02111-1307, USA
21  *
22  * For questions, suggestions, bug-reports, enhancement-requests etc.
23  * I may be contacted at:
24  *
25  * ronald@innovation.ch
26  *
27  */

28
29 package HTTPClient;
30
31
32 /**
33  * This interface defines various global constants.
34  *
35  * @version 0.3-2 18/06/1999
36  * @author Ronald Tschalär
37  * @since V0.3
38  */

39
40 interface GlobalConstants
41 {
42     /** Debug variables */
43     boolean DebugAll = false;
44     boolean DebugConn = DebugAll | false;
45     boolean DebugResp = DebugAll | false;
46     boolean DebugDemux = DebugAll | false;
47     boolean DebugAuth = DebugAll | false;
48     boolean DebugSocks = DebugAll | false;
49     boolean DebugMods = DebugAll | false;
50     boolean DebugURLC = DebugAll | false;
51
52     /** possible http protocols we (might) handle */
53     int HTTP = 0; // plain http
54
int HTTPS = 1; // http on top of SSL
55
int SHTTP = 2; // secure http
56
int HTTP_NG = 3; // http next-generation
57

58     /** some known http versions */
59     int HTTP_1_0 = (1 << 16) + 0;
60     int HTTP_1_1 = (1 << 16) + 1;
61
62     /** Content delimiters */
63     int CD_NONE = 0; // raw read from the stream
64
int CD_HDRS = 1; // reading headers/trailers
65
int CD_0 = 2; // no body
66
int CD_CLOSE = 3; // by closing connection
67
int CD_CONTLEN = 4; // via the Content-Length header
68
int CD_CHUNKED = 5; // via chunked transfer encoding
69
int CD_MP_BR = 6; // via multipart/byteranges
70
}
71
72
Popular Tags