/*** Initiates control connections and gets initial reply. ***/ @Override protected void _connectAction_() throws IOException { super._connectAction_(); _reader = new CRLFLineReader(new InputStreamReader(_input_, encoding)); _writer = new BufferedWriter(new OutputStreamWriter(_output_, encoding)); __getReply(); }
boolean prevWasCR = false; synchronized(lock) { // make thread-safe (hopefully!) while((intch = read()) != -1)
CRLFLineReader rdr = new CRLFLineReader(new InputStreamReader(socket.getInputStream(), "ASCII")); String response = rdr.readLine(); double responseTime = tracker.elapsedTimeInMillis(); response = rdr.readLine(); } while (response != null && !endMultiline.matcher(response).find()); if (response == null) {
/*** * Initiates control connections and gets initial reply, determining * if the client is allowed to post to the server. Initializes * {@link #_reader_} and {@link #_writer_} to wrap * {@link SocketClient#_input_} and {@link SocketClient#_output_}. ***/ @Override protected void _connectAction_() throws IOException { super._connectAction_(); _reader_ = new CRLFLineReader(new InputStreamReader(_input_, __DEFAULT_ENCODING)); _writer_ = new BufferedWriter(new OutputStreamWriter(_output_, __DEFAULT_ENCODING)); __getReply(); _isAllowedToPost = (_replyCode == NNTPReply.SERVER_READY_POSTING_ALLOWED); }
/*** * Performs connection initialization and sets state to * <code> AUTHORIZATION_STATE </code>. ***/ @Override protected void _connectAction_() throws IOException { super._connectAction_(); _reader = new CRLFLineReader(new InputStreamReader(_input_, _DEFAULT_ENCODING)); _writer = new BufferedWriter(new OutputStreamWriter(_output_, _DEFAULT_ENCODING)); __getReply(); setState(AUTHORIZATION_STATE); }
/** * Performs connection initialization and sets state to * {@link IMAPState#NOT_AUTH_STATE}. */ @Override protected void _connectAction_() throws IOException { super._connectAction_(); _reader = new CRLFLineReader(new InputStreamReader(_input_, __DEFAULT_ENCODING)); __writer = new BufferedWriter(new OutputStreamWriter(_output_, __DEFAULT_ENCODING)); int tmo = getSoTimeout(); if (tmo <= 0) { // none set currently setSoTimeout(connectTimeout); // use connect timeout to ensure we don't block forever } __getReply(false); // untagged response if (tmo <= 0) { setSoTimeout(tmo); // restore the original value } setState(IMAPState.NOT_AUTH_STATE); }
new CRLFLineReader(new InputStreamReader(_input_, getControlEncoding())); _controlOutput_ = new BufferedWriter(new OutputStreamWriter(_output_, getControlEncoding()));
if(socketIsReader == null) { _controlInput_ = new CRLFLineReader(new InputStreamReader(_input_, getControlEncoding())); } else { _controlInput_ = new CRLFLineReader(socketIsReader);
_output_ = socket.getOutputStream(); _reader = new CRLFLineReader(new InputStreamReader(_input_, __DEFAULT_ENCODING)); __writer =
_input_ = socket.getInputStream(); _output_ = socket.getOutputStream(); _reader = new CRLFLineReader( new InputStreamReader(_input_, encoding)); _writer = new BufferedWriter(
_input_ = socket.getInputStream(); _output_ = socket.getOutputStream(); _reader = new CRLFLineReader(new InputStreamReader(_input_, _DEFAULT_ENCODING)); _writer = new BufferedWriter(new OutputStreamWriter(_output_, _DEFAULT_ENCODING));