Code example for PipedInputStream

Methods: connect

0
	public Connector(Base b) throws IOException {
		base = b;
		 
		//logger = new FileOutputStream(base.getLog()); 
		 
		consolePipedInput = new PipedInputStream();
		consolePipedOutput = new PipedOutputStream();
		consolePipedInput.connect(consolePipedOutput);
	} 
	public void host() throws IOException { 
		host(DEFAULT_PORT);
	} 
	 
	public void host(int port) throws IOException {
		final ServerSocket myServer = new ServerSocket(port);
		 
		usedPort = port;
		friendSocket = myServer.accept();
		friendInputStream = friendSocket.getInputStream();
		friendOutputStream = friendSocket.getOutputStream();
Experience pair programming with AI  Get Codota for Java