History

My first initial commit with all of mine experimental changes.

Dmitry Kabak (userdima committed 13 years ago

Commit d37b88d1 parent 3f5b46618352 files · +2598093 −-8690Browse files

Showing the changes to java/pkg/sun/net/httpserver/HttpExchangeImpl.java (1 of 18352 files). Show all

Unified · Split

java/pkg/sun/net/httpserver/HttpExchangeImpl.java+120−0
@@ -0,0 +1,120 @@
1/*
2 * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26package sun.net.httpserver;
27
28import java.io.*;
29import java.nio.*;
30import java.nio.channels.*;
31import java.net.*;
32import javax.net.ssl.*;
33import java.util.*;
34import sun.net.www.MessageHeader;
35import com.sun.net.httpserver.*;
36import com.sun.net.httpserver.spi.*;
37
38class HttpExchangeImpl extends HttpExchange {
39
40 ExchangeImpl impl;
41
42 HttpExchangeImpl (ExchangeImpl impl) {
43 this.impl = impl;
44 }
45
46 public Headers getRequestHeaders () {
47 return impl.getRequestHeaders();
48 }
49
50 public Headers getResponseHeaders () {
51 return impl.getResponseHeaders();
52 }
53
54 public URI getRequestURI () {
55 return impl.getRequestURI();
56 }
57
58 public String getRequestMethod (){
59 return impl.getRequestMethod();
60 }
61
62 public HttpContextImpl getHttpContext (){
63 return impl.getHttpContext();
64 }
65
66 public void close () {
67 impl.close();
68 }
69
70 public InputStream getRequestBody () {
71 return impl.getRequestBody();
72 }
73
74 public int getResponseCode () {
75 return impl.getResponseCode();
76 }
77
78 public OutputStream getResponseBody () {
79 return impl.getResponseBody();
80 }
81
82
83 public void sendResponseHeaders (int rCode, long contentLen)
84 throws IOException
85 {
86 impl.sendResponseHeaders (rCode, contentLen);
87 }
88
89 public InetSocketAddress getRemoteAddress (){
90 return impl.getRemoteAddress();
91 }
92
93 public InetSocketAddress getLocalAddress (){
94 return impl.getLocalAddress();
95 }
96
97 public String getProtocol (){
98 return impl.getProtocol();
99 }
100
101 public Object getAttribute (String name) {
102 return impl.getAttribute (name);
103 }
104
105 public void setAttribute (String name, Object value) {
106 impl.setAttribute (name, value);
107 }
108
109 public void setStreams (InputStream i, OutputStream o) {
110 impl.setStreams (i, o);
111 }
112
113 public HttpPrincipal getPrincipal () {
114 return impl.getPrincipal();
115 }
116
117 ExchangeImpl getExchangeImpl () {
118 return impl;
119 }
120}