/** * {@inheritDoc} */ public final void write(final int c) throws IOException { /* * super.write(c); if (c == '\n') { lineLength = 0; } else { lineLength += 1; } if (lineLength >= FOLD_LENGTH) { * super.write(FOLD_PATTERN); } */ write(new char[]{(char) c}, 0, 1); }
/** * Outputs an iCalender string to the specified writer. * @param card a vCard object to output as a string * @param out a writer to write the output string to * @throws IOException thrown when unable to write to writer * @throws ValidationException where the specified vCard is not valid */ public final void output(final VCard card, final Writer out) throws IOException, ValidationException { if (isValidating()) { card.validate(); } final FoldingWriter writer = new FoldingWriter(out, foldLength); try { writer.write(card.toString()); } finally { writer.close(); } }
/** * Test writing a line equal to fold length. */ public void testLineLength73() throws IOException { StringWriter sw = new StringWriter(); FoldingWriter writer = new FoldingWriter(sw); writer.write("BEGIN:VCALENDAR"); writer.write(Strings.LINE_SEPARATOR); writer.write("PRODID:-//Open Source Applications Foundation//NONSGML Scooby Server//EN"); writer.write(Strings.LINE_SEPARATOR); writer.write("VERSION:2.0"); LOG.info(sw.getBuffer().toString()); } }
/** * Outputs an iCalender string to the specified writer. * @param calendar calendar to write to writer * @param out a writer * @throws IOException thrown when unable to write to writer * @throws ValidationException where calendar validation fails */ public final void output(final Calendar calendar, final Writer out) throws IOException, ValidationException { if (isValidating()) { calendar.validate(); } final FoldingWriter writer = new FoldingWriter(out, foldLength); try { writer.write(calendar.toString()); } finally { writer.close(); } } }
/** * Outputs an iCalender string to the specified writer. * @param calendar calendar to write to writer * @param out a writer * @throws IOException thrown when unable to write to writer * @throws ValidationException where calendar validation fails */ public final void output(final Calendar calendar, final Writer out) throws IOException, ValidationException { if (isValidating()) { calendar.validate(); } try (FoldingWriter writer = new FoldingWriter(out, foldLength)) { writer.write(calendar.toString()); } } }
/** * Outputs an iCalender string to the specified writer. * @param calendar calendar to write to writer * @param out a writer * @throws IOException thrown when unable to write to writer * @throws ValidationException where calendar validation fails */ public final void output(final Calendar calendar, final Writer out) throws IOException, ValidationException { if (isValidating()) { calendar.validate(); } final FoldingWriter writer = new FoldingWriter(out, foldLength); try { writer.write(calendar.toString()); } finally { writer.close(); } } }
/** * Outputs an iCalender string to the specified writer. * @param card a vCard object to output as a string * @param out a writer to write the output string to * @throws IOException thrown when unable to write to writer * @throws ValidationException where the specified vCard is not valid */ public final void output(final VCard card, final Writer out) throws IOException, ValidationException { if (isValidating()) { card.validate(); } try (FoldingWriter writer = new FoldingWriter(out, foldLength)) { writer.write(card.toString()); } }
/** * {@inheritDoc} */ public final void write(final int c) throws IOException { /* * super.write(c); if (c == '\n') { lineLength = 0; } else { lineLength += 1; } if (lineLength >= FOLD_LENGTH) { * super.write(FOLD_PATTERN); } */ write(new char[]{(char) c}, 0, 1); }
/** * Outputs an iCalender string to the specified writer. * @param calendar calendar to write to writer * @param out a writer * @throws IOException thrown when unable to write to writer * @throws ValidationException where calendar validation fails */ public final void output(final Calendar calendar, final Writer out) throws IOException, ValidationException { if (isValidating()) { calendar.validate(); } final FoldingWriter writer = new FoldingWriter(out, foldLength); try { writer.write(calendar.toString()); } finally { writer.close(); } } }
/** * Outputs an iCalender string to the specified writer. * @param calendar calendar to write to writer * @param out a writer * @throws IOException thrown when unable to write to writer * @throws ValidationException where calendar validation fails */ public final void output(final Calendar calendar, final Writer out) throws IOException, ValidationException { if (isValidating()) { calendar.validate(); } try (FoldingWriter writer = new FoldingWriter(out, foldLength)) { writer.write(calendar.toString()); } } }
/** * {@inheritDoc} */ public final void write(final int c) throws IOException { /* * super.write(c); if (c == '\n') { lineLength = 0; } else { lineLength += 1; } if (lineLength >= FOLD_LENGTH) { * super.write(FOLD_PATTERN); } */ write(new char[]{(char) c}, 0, 1); }
/** * {@inheritDoc} */ public final void write(final int c) throws IOException { /* * super.write(c); if (c == '\n') { lineLength = 0; } else { lineLength += 1; } if (lineLength >= FOLD_LENGTH) { * super.write(FOLD_PATTERN); } */ write(new char[]{(char) c}, 0, 1); }
/** * {@inheritDoc} */ public final void write(final int c) throws IOException { /* * super.write(c); if (c == '\n') { lineLength = 0; } else { lineLength += 1; } if (lineLength >= FOLD_LENGTH) { * super.write(FOLD_PATTERN); } */ write(new char[] { (char) c }, 0, 1); }
/** * {@inheritDoc} */ public final void write(final String str, final int off, final int len) throws IOException { write(str.toCharArray(), off, len); }
/** * {@inheritDoc} */ public final void write(final String str, final int off, final int len) throws IOException { write(str.toCharArray(), off, len); }
/** * {@inheritDoc} */ public final void write(final String str, final int off, final int len) throws IOException { write(str.toCharArray(), off, len); }
/** * {@inheritDoc} */ public final void write(final String str, final int off, final int len) throws IOException { write(str.toCharArray(), off, len); }
/** * {@inheritDoc} */ public final void write(final String str, final int off, final int len) throws IOException { write(str.toCharArray(), off, len); }