| 1 |
package org.globus.gsi.tomcat; |
| 2 |
|
| 3 |
import java.io.IOException; |
| 4 |
import java.io.InputStream; |
| 5 |
|
| 6 |
import javax.net.ssl.SSLSocket; |
| 7 |
|
| 8 |
|
| 9 |
public class GlobusSSLInputStream extends InputStream{ |
| 10 |
private InputStream delegate; |
| 11 |
private SSLSocket sslSocket; |
| 12 |
|
| 13 |
public GlobusSSLInputStream(InputStream delegate, SSLSocket sslSocket) { |
| 14 |
this.delegate = delegate; |
| 15 |
this.sslSocket = sslSocket; |
| 16 |
} |
| 17 |
|
| 18 |
public SSLSocket getSSLSocket(){ |
| 19 |
return sslSocket; |
| 20 |
} |
| 21 |
|
| 22 |
public int available() throws IOException { |
| 23 |
return delegate.available(); |
| 24 |
} |
| 25 |
|
| 26 |
public void close() throws IOException { |
| 27 |
delegate.close(); |
| 28 |
} |
| 29 |
|
| 30 |
public boolean equals(Object obj) { |
| 31 |
return delegate.equals(obj); |
| 32 |
} |
| 33 |
|
| 34 |
public int hashCode() { |
| 35 |
return delegate.hashCode(); |
| 36 |
} |
| 37 |
|
| 38 |
public void mark(int readlimit) { |
| 39 |
delegate.mark(readlimit); |
| 40 |
} |
| 41 |
|
| 42 |
public boolean markSupported() { |
| 43 |
return delegate.markSupported(); |
| 44 |
} |
| 45 |
|
| 46 |
public int read() throws IOException { |
| 47 |
return delegate.read(); |
| 48 |
} |
| 49 |
|
| 50 |
public int read(byte[] b, int off, int len) throws IOException { |
| 51 |
return delegate.read(b, off, len); |
| 52 |
} |
| 53 |
|
| 54 |
public int read(byte[] b) throws IOException { |
| 55 |
return delegate.read(b); |
| 56 |
} |
| 57 |
|
| 58 |
public void reset() throws IOException { |
| 59 |
delegate.reset(); |
| 60 |
} |
| 61 |
|
| 62 |
public long skip(long n) throws IOException { |
| 63 |
return delegate.skip(n); |
| 64 |
} |
| 65 |
|
| 66 |
public String toString() { |
| 67 |
return delegate.toString(); |
| 68 |
} |
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
} |