Example usage for org.apache.commons.net.pop3 POP3Client setReceiveBufferSize

List of usage examples for org.apache.commons.net.pop3 POP3Client setReceiveBufferSize

Introduction

In this page you can find the example usage for org.apache.commons.net.pop3 POP3Client setReceiveBufferSize.

Prototype

public void setReceiveBufferSize(int size) throws SocketException 

Source Link

Document

Sets the underlying socket receive buffer size.

Usage

From source file:com.adaptris.mail.Pop3ReceiverFactory.java

@Override
POP3Client preConnectConfigure(POP3Client client) throws MailException {
    try {/*from w  ww. ja va  2 s .com*/
        if (getConnectTimeout() != null) {
            client.setConnectTimeout(getConnectTimeout().intValue());
        }
        if (getReceiveBufferSize() != null) {
            client.setReceiveBufferSize(getReceiveBufferSize().intValue());
        }
        if (getSendBufferSize() != null) {
            client.setSendBufferSize(getSendBufferSize().intValue());
        }
        if (getTimeout() != null) {
            client.setDefaultTimeout(getTimeout().intValue());
        }
    } catch (SocketException e) {
        throw new MailException(e);
    }
    return client;
}