Code example for PipedInputStream

Methods: readclose

0
	public void run() { 
		byte[] b = new byte[1024];
		int length = 0;
		 
		try { 
			length = pipIn.read(b);
		} catch (IOException e) {
			e.printStackTrace();
		} 
		 
		try { 
			pipIn.close();
		} catch (IOException e) {
			e.printStackTrace();
		} 
		 
		System.out.println("接收内容为:" + new String(b, 0, length));
	} 
 
	public final PipedInputStream getPipIn() {
Stop searching for code, let great code find you!  Add Codota to your java IDE