private static int expectBoolean ( Object value ) throws SocketException {
        int v;
        try {
            v = ( (Boolean) value ).booleanValue() ? 1 : 0;
        }
        catch ( ClassCastException e ) {
            throw new AFUNIXSocketException("Unsupport value: " + value, e);
        }
        catch ( NullPointerException e ) {
            throw new AFUNIXSocketException("Value must not be null", e);
        }
        return v;
    }