List of usage examples for org.apache.commons.net.nntp NNTPConnectionClosedException NNTPConnectionClosedException
public NNTPConnectionClosedException(String message)
From source file:org.random_access.newsreader.nntp.CustomNNTP.java
private void __getReply() throws IOException { this._replyString = this._reader_.readLine(); if (this._replyString == null) { throw new NNTPConnectionClosedException("Connection closed without indication."); } else if (this._replyString.length() < 3) { throw new MalformedServerReplyException("Truncated server reply: " + this._replyString); } else {/* www. j a va2 s . c om*/ try { this._replyCode = Integer.parseInt(this._replyString.substring(0, 3)); } catch (NumberFormatException var2) { throw new MalformedServerReplyException( "Could not parse response code.\nServer Reply: " + this._replyString); } this.fireReplyReceived(this._replyCode, this._replyString + "\r\n"); if (this._replyCode == 400) { throw new NNTPConnectionClosedException("NNTP response 400 received. Server closed connection."); } } }