Java Code Examples for java.io.EOFException#getMessage()
The following examples show how to use
java.io.EOFException#getMessage() .
These examples are extracted from open source projects.
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 Project: grpc-nebula-java File: OkHttpReadableBuffer.java License: Apache License 2.0 | 5 votes |
@Override public void skipBytes(int length) { try { buffer.skip(length); } catch (EOFException e) { throw new IndexOutOfBoundsException(e.getMessage()); } }
Example 2
Source Project: FairEmail File: POP3Store.java License: GNU General Public License v3.0 | 5 votes |
@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 Project: grpc-java File: OkHttpReadableBuffer.java License: Apache License 2.0 | 5 votes |
@Override public void skipBytes(int length) { try { buffer.skip(length); } catch (EOFException e) { throw new IndexOutOfBoundsException(e.getMessage()); } }