String (@NotNull Document document, String lineSeparator) { try { StringWriter writer = new StringWriter(); writeDocument(document, writer, lineSeparator); return writer.toString(); } catch (IOException ignored) { // Can't be return ""; } }