···296296 * the processing done by the normal send method, and is most useful
297297 * for bulk transmissions. It writes the provided string to the socket
298298 * in a single command, followed by a flush.
299299+ *
300300+ * @param data the data.
301301+ * @param offset the start offset in the data.
302302+ * @param length the number of bytes to write.
299303 *
300304 * @see #send
301305 */
302306 public void sendRaw(byte[] data, int offset, int length) throws IOException {
303307 if (globalConfig.getConnDebug()) {
308308+ ByteArrayOutputStream stream = new ByteArrayOutputStream();
309309+ stream.write("[SEND RAW]\r\n".getBytes());
310310+ stream.write(data, offset, length);
304311 EventLogger.logEvent(AppInfo.GUID,
305305- ("[SEND RAW]\r\n"
306306- + new String(data, offset, length)).getBytes(),
307307- EventLogger.DEBUG_INFO);
312312+ stream.toByteArray(), EventLogger.DEBUG_INFO);
308313 }
309314310315 synchronized(socketLock) {
···11+/*-
22+ * Copyright (c) 2011, Derek Konigsberg
33+ * All rights reserved.
44+ *
55+ * Redistribution and use in source and binary forms, with or without
66+ * modification, are permitted provided that the following conditions
77+ * are met:
88+ *
99+ * 1. Redistributions of source code must retain the above copyright
1010+ * notice, this list of conditions and the following disclaimer.
1111+ * 2. Redistributions in binary form must reproduce the above copyright
1212+ * notice, this list of conditions and the following disclaimer in the
1313+ * documentation and/or other materials provided with the distribution.
1414+ * 3. Neither the name of the project nor the names of its
1515+ * contributors may be used to endorse or promote products derived
1616+ * from this software without specific prior written permission.
1717+ *
1818+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1919+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2020+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2121+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2222+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2323+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2424+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2525+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2626+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2727+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2828+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
2929+ * OF THE POSSIBILITY OF SUCH DAMAGE.
3030+ */
3131+package org.logicprobe.LogicMail.mail.pop;
3232+3333+import j2meunit.framework.Test;
3434+import j2meunit.framework.TestCase;
3535+import j2meunit.framework.TestSuite;
3636+3737+public class PopTests extends TestCase {
3838+3939+ public PopTests() {
4040+ super();
4141+ }
4242+4343+ public Test suite() {
4444+ TestSuite suite = new TestSuite("LogicMail.mail.pop");
4545+ suite.addTest(new PopProtocolTest().suite());
4646+ return suite;
4747+ }
4848+}
···11+/*-
22+ * Copyright (c) 2011, Derek Konigsberg
33+ * All rights reserved.
44+ *
55+ * Redistribution and use in source and binary forms, with or without
66+ * modification, are permitted provided that the following conditions
77+ * are met:
88+ *
99+ * 1. Redistributions of source code must retain the above copyright
1010+ * notice, this list of conditions and the following disclaimer.
1111+ * 2. Redistributions in binary form must reproduce the above copyright
1212+ * notice, this list of conditions and the following disclaimer in the
1313+ * documentation and/or other materials provided with the distribution.
1414+ * 3. Neither the name of the project nor the names of its
1515+ * contributors may be used to endorse or promote products derived
1616+ * from this software without specific prior written permission.
1717+ *
1818+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1919+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2020+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2121+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2222+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2323+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2424+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2525+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2626+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2727+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2828+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
2929+ * OF THE POSSIBILITY OF SUCH DAMAGE.
3030+ */
3131+package org.logicprobe.LogicMail.mail.smtp;
3232+3333+import j2meunit.framework.Test;
3434+import j2meunit.framework.TestCase;
3535+import j2meunit.framework.TestSuite;
3636+3737+public class SmtpTests extends TestCase {
3838+3939+ public SmtpTests() {
4040+ super();
4141+ }
4242+4343+ public Test suite() {
4444+ TestSuite suite = new TestSuite("LogicMail.mail.smtp");
4545+ suite.addTest(new SmtpProtocolTest().suite());
4646+ return suite;
4747+ }
4848+}