code: public String getAndReset(String characterSet) {
  		if (null == characterSet || characterSet.trim().isEmpty()) {
  			return getAndReset();
  		}
  		synchronized (buffer) {
  			String res = new String(this.buffer.toByteArray(), Charset.forName(characterSet));
  			this.buffer.reset();
  			return res;
  		}
  	}
docs: returns the content of the buffer (ByteArrayOutputStream) with specific characterSet and resets it
  @param characterSet
  @return