if (read_pos != read_pos_end) {
// error: attempt to write outbound data into the stream before
// all the inbound handshake data had been read
throw new AlertException(
AlertProtocol.INTERNAL_ERROR,
new SSLHandshakeException("Data was not fully read: "
+ read_pos + " " + read_pos_end));
}
// set up the write positions
if (write_pos_beg < read_pos_end) {
write_pos_beg = read_pos_end;