src/share/classes/sun/security/ssl/SSLSocketImpl.java

Print this page
rev 10457 : 8054720: Modifications of I/O methods for instrumentation purposes
Summary: Wrap some native methods in Java methods and change native method names to a consistent form.
Reviewed-by: TBD


1462                     // hello request is not included in the handshake
1463                     // hashes, reset them
1464                     handshaker.handshakeHash.reset();
1465                 }
1466             }
1467         }
1468     }
1469 
1470     //
1471     // CLOSURE RELATED CALLS
1472     //
1473 
1474     /**
1475      * Return whether the socket has been explicitly closed by the application.
1476      */
1477     @Override
1478     public boolean isClosed() {
1479         return connectionState == cs_APP_CLOSED;
1480     }
1481 





1482     /**
1483      * Return whether we have reached end-of-file.
1484      *
1485      * If the socket is not connected, has been shutdown because of an error
1486      * or has been closed, throw an Exception.
1487      */
1488     boolean checkEOF() throws IOException {
1489         switch (getConnectionState()) {
1490         case cs_START:
1491             throw new SocketException("Socket is not connected");
1492 
1493         case cs_HANDSHAKE:
1494         case cs_DATA:
1495         case cs_RENEGOTIATE:
1496         case cs_SENT_CLOSE:
1497             return false;
1498 
1499         case cs_APP_CLOSED:
1500             throw new SocketException("Socket is closed");
1501 




1462                     // hello request is not included in the handshake
1463                     // hashes, reset them
1464                     handshaker.handshakeHash.reset();
1465                 }
1466             }
1467         }
1468     }
1469 
1470     //
1471     // CLOSURE RELATED CALLS
1472     //
1473 
1474     /**
1475      * Return whether the socket has been explicitly closed by the application.
1476      */
1477     @Override
1478     public boolean isClosed() {
1479         return connectionState == cs_APP_CLOSED;
1480     }
1481 
1482     @Override
1483     boolean isLayered() {
1484         return super.isLayered();
1485     }
1486 
1487     /**
1488      * Return whether we have reached end-of-file.
1489      *
1490      * If the socket is not connected, has been shutdown because of an error
1491      * or has been closed, throw an Exception.
1492      */
1493     boolean checkEOF() throws IOException {
1494         switch (getConnectionState()) {
1495         case cs_START:
1496             throw new SocketException("Socket is not connected");
1497 
1498         case cs_HANDSHAKE:
1499         case cs_DATA:
1500         case cs_RENEGOTIATE:
1501         case cs_SENT_CLOSE:
1502             return false;
1503 
1504         case cs_APP_CLOSED:
1505             throw new SocketException("Socket is closed");
1506