private void write(byte b) throws IOException {
  int i=0;
  for (i=1; i < (currSep.length); i++) {
    currSep[i - 1]=currSep[i];
  }
  currSep[i - 1]=b;
  bufOut.write(b);
  if ((cLast >= (lineSeparatorLength - 1)) && (lineSeparator.equals(new String(currSep)))) {
    cLast=0;
    out.print(createAnnotation() + bufOut.toString());
    out.flush();
    bufOut.reset();
    if (out.checkError()) {
      throw new IOException("PipeWriter: IO Exception when" + " writing to output stream.");
    }
  }
 else {
    cLast++;
  }
}

private void write ( byte b ) throws IOException { int i = 0 ; for ( i = 1 ; i < ( currSep . length ) ; i ++ ) { currSep [ i - 1 ] = currSep [ i ] ; } currSep [ i - 1 ] = b ; bufOut . write ( b ) ; if ( ( cLast >= ( lineSeparatorLength - 1 ) ) && ( lineSeparator . equals ( new String ( currSep ) ) ) ) { cLast = 0 ; out . print ( createAnnotation ( ) + bufOut . toString ( ) ) ; out . flush ( ) ; bufOut . reset ( ) ; if ( out . checkError ( ) ) { throw new IOException ( "PipeWriter: IO Exception when" + " writing to output stream." ) ; } } else { cLast ++ ; } }
write a byte of data to the stream . if we have not matched a line separator string , then the byte is appended to the internal buffer . if we have matched a line separator , then the currently buffered line is sent to the output writer with a prepended annotation string .
