Drupal: klient nemusí posílat In-Reply-To hlavičku, ale jen References, kde je víc messageID – vezmeme to poslední.
2 GNU-Classpath Extensions: javamail
3 Copyright (C) 2002 Chris Burdess
5 For more information on the classpathx please mail:
6 nferrier@tapsellferrier.co.uk
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 package org.sonews.util.io; // original package: gnu.mail.providers.smtp
24 import java.io.FilterOutputStream;
25 import java.io.IOException;
28 * An output stream implementing the SMTP specification for dot escaping.
29 * Objects of this class are intended to be chained with CRLFOutputStream
30 * instances as all SMTP output is intended to be CRLF-escaped.
35 public class SMTPOutputStream extends FilterOutputStream {
40 public static final int LF = 0x0a;
44 public static final int DOT = 0x2e;
46 * The last octet read.
51 * Constructs an SMTP output stream connected to the specified output stream.
52 * The underlying output stream should coordinate proper CRLF pairs at
54 * @param out a CRLFOutputStream
56 public SMTPOutputStream(CRLFOutputStream out) {
61 * Writes a character to the underlying stream.
62 * @exception IOException if an I/O error occurred
65 public void write(int ch) throws IOException {
76 * Writes a byte array to the underlying stream.
77 * @exception IOException if an I/O error occurred
80 public void write(byte b[]) throws IOException {
81 write(b, 0, b.length);
85 * Writes a portion of a byte array to the underlying stream.
86 * @exception IOException if an I/O error occurred
89 public void write(byte b[], int off, int len) throws IOException {
92 for (int i = off; i < len; i++) {
108 out.write(b, d, len - d);