1 package com.maverick.multiplex.channels; 2 3 import java.io.IOException ; 4 import java.io.InputStream ; 5 import java.io.OutputStream ; 6 import java.net.Socket ; 7 8 import com.maverick.multiplex.Channel; 9 10 16 public class SocketWrappedChannel extends Socket { 17 Channel channel; 18 19 public SocketWrappedChannel(Channel channel) { 20 this.channel = channel; 21 } 22 23 public InputStream getInputStream() { 24 return channel.getInputStream(); 25 } 26 27 public OutputStream getOutputStream() { 28 return channel.getOutputStream(); 29 } 30 31 public void close() throws IOException { 32 channel.close(); 33 } 34 } | Popular Tags |