code: public String getAndReset() {
  		synchronized (buffer) {
  			String res = new String(this.buffer.toByteArray(), getCharacterSet());
  			this.buffer.reset();
  			return res;
  		}
  	}
docs: returns the content of the buffer (ByteArrayOutputStream) and resets it
  @return