home *** CD-ROM | disk | FTP | other *** search
- package sun.net.www.protocol.verbatim;
-
- import java.io.IOException;
- import java.io.InputStream;
- import java.io.OutputStream;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.net.URLConnection;
- import sun.net.www.content.text.plain;
-
- class VerbatimConnection extends URLConnection {
- URLConnection sub;
-
- protected VerbatimConnection(URL var1) throws MalformedURLException, IOException {
- super(var1);
- String var2 = var1.getFile();
- if (var2.startsWith("/")) {
- var2 = var2.substring(1);
- }
-
- this.sub = (new URL((URL)null, var2)).openConnection();
- }
-
- public void connect() throws IOException {
- this.sub.connect();
- }
-
- public String getContentType() {
- return "text/plain";
- }
-
- public String getHeaderField(String var1) {
- return var1.equalsIgnoreCase("content-type") ? this.getContentType() : this.sub.getHeaderField(var1);
- }
-
- public String getHeaderFieldKey(int var1) {
- return this.sub.getHeaderFieldKey(var1);
- }
-
- public String getHeaderField(int var1) {
- return "content-type".equalsIgnoreCase(this.getHeaderFieldKey(var1)) ? this.getContentType() : this.sub.getHeaderField(var1);
- }
-
- public Object getContent() throws IOException {
- return (new plain()).getContent(this.sub);
- }
-
- public InputStream getInputStream() throws IOException {
- return this.sub.getInputStream();
- }
-
- public OutputStream getOutputStream() throws IOException {
- return this.sub.getOutputStream();
- }
-
- public String toString() {
- return "verbatim:" + this.sub.toString();
- }
-
- public void setDoInput(boolean var1) {
- this.sub.setDoInput(var1);
- }
-
- public boolean getDoInput() {
- return this.sub.getDoInput();
- }
-
- public void setDoOutput(boolean var1) {
- this.sub.setDoOutput(var1);
- }
-
- public boolean getDoOutput() {
- return this.sub.getDoOutput();
- }
-
- public void setAllowUserInteraction(boolean var1) {
- this.sub.setAllowUserInteraction(var1);
- }
-
- public boolean getAllowUserInteraction() {
- return this.sub.getAllowUserInteraction();
- }
-
- public void setUseCaches(boolean var1) {
- this.sub.setUseCaches(var1);
- }
-
- public boolean getUseCaches() {
- return this.sub.getUseCaches();
- }
-
- public void setIfModifiedSince(long var1) {
- this.sub.setIfModifiedSince(var1);
- }
-
- public long getIfModifiedSince() {
- return this.sub.getIfModifiedSince();
- }
-
- public void setRequestProperty(String var1, String var2) {
- this.sub.setRequestProperty(var1, var2);
- }
-
- public String getRequestProperty(String var1) {
- return this.sub.getRequestProperty(var1);
- }
- }
-