1 55 package org.jboss.axis.transport.http; 56 57 58 import java.io.IOException ; 59 import java.io.InputStream ; 60 61 62 66 67 70 71 72 public class SocketInputStream extends java.io.FilterInputStream 73 { 74 protected volatile boolean closed = false; 75 java.net.Socket socket = null; 76 77 private SocketInputStream() 78 { 79 super(null); 80 } 81 82 83 public SocketInputStream(InputStream is, java.net.Socket socket) 84 { 85 super(is); 86 this.socket = socket; 87 } 88 89 public void close() throws IOException 90 { 91 synchronized (this) 92 { 93 if (closed) return; 94 closed = true; 95 } 96 in.close(); 97 in = null; 98 socket.close(); 99 socket = null; 100 } 101 } 102 | Popular Tags |