Code example for PipedOutputStream

Methods: close, write

0
	@Override 
	public void run() { 
		String str = "Hello World";
		 
		try { 
			pipOut.write(str.getBytes());
		} catch (IOException e) {
			e.printStackTrace();
		} 
		try { 
			pipOut.close();
		} catch (IOException e) {
			e.printStackTrace();
		} 
		 
		 
	} 
 
	public PipedOutputStream getPipOut() {
		return pipOut;
	}