src/main/java/org/java_websocket/SSLSocketChannel.java
private ByteBuffer enlargeBuffer( ByteBuffer buffer, int sessionProposedCapacity ) {
		if( sessionProposedCapacity > buffer.capacity() ) {
			buffer = ByteBuffer.allocate( sessionProposedCapacity );
		} else {
			buffer = ByteBuffer.allocate( buffer.capacity() * 2 );
		}
		return buffer;
	}
private ByteBuffer enlargeBuffer( ByteBuffer buffer, int sessionProposedCapacity ) {
		if( sessionProposedCapacity > buffer.capacity() ) {
			buffer = ByteBuffer.allocate( sessionProposedCapacity );
		} else {
			buffer = ByteBuffer.allocate( buffer.capacity() * 2 );
		}
		return buffer;
	}
Compares <code>sessionProposedCapacity<code> with buffer's capacity. If buffer's capacity is smaller,
returns a buffer with the proposed capacity. If it's equal or larger, returns a buffer
with capacity twice the size of the initial one.

@param buffer                  - the buffer to be enlarged.
@param sessionProposedCapacity - the minimum size of the new buffer, proposed by {@link SSLSession}.
@return A new buffer with a larger capacity.