+ return line;
+ }
+
+ private BufferedReader inReader;
+
+ /**
+ * Write a line, possible encrypted.
+ *
+ * @param out
+ * the stream to write to
+ * @param line
+ * the line to write
+ * @throws IOException
+ * in case of I/O error
+ * @throws SSLException
+ * in case of crypt error
+ */
+ private void writeLine(OutputStream out, String line) throws IOException {
+ if (crypt == null) {
+ out.write(line.getBytes());
+ bytesSent += line.length();
+ } else {
+ // TODO: how NOT to create so many big Strings?
+ String b64 = crypt.encrypt64(line, false);
+ out.write(b64.getBytes());
+ bytesSent += b64.length();