Code example for StringWriter

Methods: append

0
	protected void addImport(Class<?> type, String methodName) {
		r("##import " + type.getName() + "." + methodName);
	} 
 
	protected void r(String line) {
		writer.append(line + "\n");
	} 
 
	protected String output(GoingConcerns concerns, String... command) {
		try { 
			writer.close();
			return new GlindaInvocation(new JournalFile(FreedomFile 
					.fromString(writer.toString()), false), getCorrespondent(),
					concerns, command).output(now);
		} catch (AssumptionViolatedException e) {
			throw e;
		} catch (Exception e) {
			throw new AssertionError(e);
		} 
	}