private void initStreams() throws IOException { traceInput = new TraceInputStream(socket.getInputStream(), traceLogger); traceInput.setQuote(quote); input = new ResponseInputStream(traceInput); traceOutput = new TraceOutputStream(socket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput)); }
private void initStreams() throws IOException { boolean quote = PropUtil.getBooleanProperty(props, "mail.debug.quote", false); traceInput = new TraceInputStream(socket.getInputStream(), traceLogger); traceInput.setQuote(quote); traceOutput = new TraceOutputStream(socket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); // should be US-ASCII, but not all JDK's support it so use iso-8859-1 input = new BufferedReader(new InputStreamReader(traceInput, "iso-8859-1")); output = new PrintWriter( new BufferedWriter( new OutputStreamWriter(traceOutput, "iso-8859-1"))); }
private void initStreams() throws IOException { boolean quote = PropUtil.getBooleanProperty(props, "mail.debug.quote", false); traceInput = new TraceInputStream(socket.getInputStream(), traceLogger); traceInput.setQuote(quote); traceOutput = new TraceOutputStream(socket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); // should be US-ASCII, but not all JDK's support it so use iso-8859-1 input = new BufferedReader(new InputStreamReader(traceInput, "iso-8859-1")); output = new PrintWriter( new BufferedWriter( new OutputStreamWriter(traceOutput, "iso-8859-1"))); }
private void initStreams() throws IOException { traceInput = new TraceInputStream(socket.getInputStream(), traceLogger); traceInput.setQuote(quote); input = new ResponseInputStream(traceInput); traceOutput = new TraceOutputStream(socket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput)); }
private void initStreams() throws IOException { boolean quote = PropUtil.getBooleanSessionProperty(session, "mail.debug.quote", false); traceInput = new TraceInputStream(serverSocket.getInputStream(), traceLogger); traceInput.setQuote(quote); traceOutput = new TraceOutputStream(serverSocket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); serverOutput = new BufferedOutputStream(traceOutput); serverInput = new BufferedInputStream(traceInput); lineInputStream = new LineInputStream(serverInput); }
private void initStreams() throws IOException { boolean quote = PropUtil.getBooleanProperty(session.getProperties(), "mail.debug.quote", false); traceInput = new TraceInputStream(serverSocket.getInputStream(), traceLogger); traceInput.setQuote(quote); traceOutput = new TraceOutputStream(serverSocket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); serverOutput = new BufferedOutputStream(traceOutput); serverInput = new BufferedInputStream(traceInput); lineInputStream = new LineInputStream(serverInput); }
/** * Constructor for debugging. * * @param in the InputStream to read from * @param out the PrintStream to write to * @param props Properties object used by this protocol * @param debug true to enable debugging output * @exception IOException for I/O errors */ public Protocol(InputStream in, PrintStream out, Properties props, boolean debug) throws IOException { this.host = "localhost"; this.props = props; this.quote = false; logger = new MailLogger(this.getClass(), "DEBUG", debug, System.out); traceLogger = logger.getSubLogger("protocol", null); // XXX - inlined initStreams, won't allow later startTLS traceInput = new TraceInputStream(in, traceLogger); traceInput.setQuote(quote); input = new ResponseInputStream(traceInput); traceOutput = new TraceOutputStream(out, traceLogger); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput)); timestamp = System.currentTimeMillis(); }
/** * Constructor for debugging. * * @param in the InputStream to read from * @param out the PrintStream to write to * @param props Properties object used by this protocol * @param debug true to enable debugging output * @exception IOException for I/O errors */ public Protocol(InputStream in, PrintStream out, Properties props, boolean debug) throws IOException { this.host = "localhost"; this.props = props; this.quote = false; tagPrefix = computePrefix(props, "mail.imap"); logger = new MailLogger(this.getClass(), "DEBUG", debug, System.out); traceLogger = logger.getSubLogger("protocol", null); // XXX - inlined initStreams, won't allow later startTLS traceInput = new TraceInputStream(in, traceLogger); traceInput.setQuote(quote); input = new ResponseInputStream(traceInput); traceOutput = new TraceOutputStream(out, traceLogger); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput)); timestamp = System.currentTimeMillis(); }
traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput));
throw new ProtocolException("can't create deflater", ex); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput));
private void initStreams() throws IOException { boolean quote = PropUtil.getBooleanProperty(props, "mail.debug.quote", false); traceInput = new TraceInputStream(socket.getInputStream(), traceLogger); traceInput.setQuote(quote); traceOutput = new TraceOutputStream(socket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); // should be US-ASCII, but not all JDK's support it so use iso-8859-1 input = new BufferedReader(new InputStreamReader(traceInput, "iso-8859-1")); output = new PrintWriter( new BufferedWriter( new OutputStreamWriter(traceOutput, "iso-8859-1"))); }
private void initStreams() throws IOException { traceInput = new TraceInputStream(socket.getInputStream(), traceLogger); traceInput.setQuote(quote); input = new ResponseInputStream(traceInput); traceOutput = new TraceOutputStream(socket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput)); }
private void initStreams() throws IOException { traceInput = new TraceInputStream(socket.getInputStream(), traceLogger); traceInput.setQuote(quote); input = new ResponseInputStream(traceInput); traceOutput = new TraceOutputStream(socket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput)); }
private void initStreams() throws IOException { boolean quote = PropUtil.getBooleanProperty(props, "mail.debug.quote", false); traceInput = new TraceInputStream(socket.getInputStream(), traceLogger); traceInput.setQuote(quote); traceOutput = new TraceOutputStream(socket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); // should be US-ASCII, but not all JDK's support it so use iso-8859-1 input = new BufferedReader(new InputStreamReader(traceInput, "iso-8859-1")); output = new PrintWriter( new BufferedWriter( new OutputStreamWriter(traceOutput, "iso-8859-1"))); }
private void initStreams() throws IOException { traceInput = new TraceInputStream(socket.getInputStream(), traceLogger); traceInput.setQuote(quote); input = new ResponseInputStream(traceInput); traceOutput = new TraceOutputStream(socket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput)); }
private void initStreams() throws IOException { traceInput = new TraceInputStream(socket.getInputStream(), traceLogger); traceInput.setQuote(quote); input = new ResponseInputStream(traceInput); traceOutput = new TraceOutputStream(socket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput)); }
private void initStreams(PrintStream out) throws IOException { traceInput = new TraceInputStream(socket.getInputStream(), out); traceInput.setTrace(debug); traceInput.setQuote(quote); input = new ResponseInputStream(traceInput); traceOutput = new TraceOutputStream(socket.getOutputStream(), out); traceOutput.setTrace(debug); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput)); }
private void initStreams(PrintStream out) throws IOException { traceInput = new TraceInputStream(socket.getInputStream(), out); traceInput.setTrace(debug); traceInput.setQuote(quote); input = new ResponseInputStream(traceInput); traceOutput = new TraceOutputStream(socket.getOutputStream(), out); traceOutput.setTrace(debug); traceOutput.setQuote(quote); output = new DataOutputStream(new BufferedOutputStream(traceOutput)); }
private void initStreams() throws IOException { boolean quote = PropUtil.getBooleanProperty(session.getProperties(), "mail.debug.quote", false); traceInput = new TraceInputStream(serverSocket.getInputStream(), traceLogger); traceInput.setQuote(quote); traceOutput = new TraceOutputStream(serverSocket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); serverOutput = new BufferedOutputStream(traceOutput); serverInput = new BufferedInputStream(traceInput); lineInputStream = new LineInputStream(serverInput); }
private void initStreams() throws IOException { boolean quote = PropUtil.getBooleanProperty(session.getProperties(), "mail.debug.quote", false); traceInput = new TraceInputStream(serverSocket.getInputStream(), traceLogger); traceInput.setQuote(quote); traceOutput = new TraceOutputStream(serverSocket.getOutputStream(), traceLogger); traceOutput.setQuote(quote); serverOutput = new BufferedOutputStream(traceOutput); serverInput = new BufferedInputStream(traceInput); lineInputStream = new LineInputStream(serverInput); }