@Override public void writeToTextFile(final OutputStream stream) throws IOException { writeToTextFile(new ATermWriter(stream)); }
@Override public void writeToSharedTextFile(final OutputStream stream) throws IOException { final ATermWriter writer = new ATermWriter(stream); writer.initializeSharing(); stream.write('!'); writeToTextFile(writer); }
@Override public String toString() { try { final OutputStream stream = new ByteArrayOutputStream(); final ATermWriter writer = new ATermWriter(stream); writeToTextFile(writer); return stream.toString(); } catch (final IOException e) { throw new OpenError("IOException: " + e.getMessage()); } }