protected final void performUpgrade(final WebSocketHttpExchange exchange, final byte[] data) {
        exchange.setResponseHeader(Headers.CONTENT_LENGTH_STRING, String.valueOf(data.length));
        exchange.setResponseHeader(Headers.UPGRADE_STRING, "WebSocket");
        exchange.setResponseHeader(Headers.CONNECTION_STRING, "Upgrade");
        upgradeChannel(exchange, data);
    }
protected final void performUpgrade ( final WebSocketHttpExchange exchange , final byte [ ] data ) { exchange . setResponseHeader ( Headers . CONTENT_LENGTH_STRING , String . valueOf ( data . length ) ) ; exchange . setResponseHeader ( Headers . UPGRADE_STRING , "WebSocket" ) ; exchange . setResponseHeader ( Headers . CONNECTION_STRING , "Upgrade" ) ; upgradeChannel ( exchange , data ) ; }
convenience method to perform the upgrade