Code example for StringWriter

Methods: getBufferwrite

0
		append(str);
	} 
 
	@Override 
	public void write(String str, int off, int len) throws IOException {
		StringWriter stringWriter = new StringWriter();
		stringWriter.write(str, off, len);
		append(stringWriter.getBuffer().toString());
	} 
 
	@Override 
	public void write(char[] cbuf, int off, int len) throws IOException {
		StringWriter stringWriter = new StringWriter();
		stringWriter.write(cbuf, off, len);
		append(stringWriter.getBuffer().toString());
	} 
 
	public Element getElement() {
		return element;
	} 
Experience pair programming with AI  Get Codota for Java