Code example for PipedOutputStream

Methods: connect, write

0
		private void feedIntoParser(byte[] data, int offset, int length) throws IOException {
			if (!parserStarted) {
				parserStarted = true;
				TestParser parser = new TestParser(this);
				PipedInputStream input = new PipedInputStream();
				buffer = new PipedOutputStream();
				buffer.connect(input);
				parser.parse(input);
			} 
			 
			buffer.write(data, offset, length);
		} 
 
		public void processStarted(int id) {
		} 
 
		public void processStopped(int id) {
			try { 
				buffer.close();
			} catch (IOException e) {
				reportSessionError(e);