Java Code Examples for java.io.EOFException#getMessage()

The following examples show how to use java.io.EOFException#getMessage() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OkHttpReadableBuffer.java    From grpc-nebula-java with Apache License 2.0 5 votes vote down vote up
@Override
public void skipBytes(int length) {
  try {
    buffer.skip(length);
  } catch (EOFException e) {
    throw new IndexOutOfBoundsException(e.getMessage());
  }
}
 
Example 2
Source File: POP3Store.java    From FairEmail with GNU General Public License v3.0 5 votes vote down vote up
@Override
   protected synchronized boolean protocolConnect(String host, int portNum,
	String user, String passwd) throws MessagingException {
	    
// check for non-null values of host, password, user
if (host == null || passwd == null || user == null)
    return false;

// if port is not specified, set it to value of mail.pop3.port
       // property if it exists, otherwise default to 110
       if (portNum == -1)
    portNum = PropUtil.getIntProperty(session.getProperties(),
			"mail." + name + ".port", -1);

if (portNum == -1)
    portNum = defaultPort;

this.host = host;
this.portNum = portNum;
this.user = user;
this.passwd = passwd;
try {
    port = getPort(null);
} catch (EOFException eex) { 
	throw new AuthenticationFailedException(eex.getMessage());
} catch (SocketConnectException scex) {
    throw new MailConnectException(scex);
} catch (IOException ioex) { 
    throw new MessagingException("Connect failed", ioex);
}

return true;
   }
 
Example 3
Source File: OkHttpReadableBuffer.java    From grpc-java with Apache License 2.0 5 votes vote down vote up
@Override
public void skipBytes(int length) {
  try {
    buffer.skip(length);
  } catch (EOFException e) {
    throw new IndexOutOfBoundsException(e.getMessage());
  }
}