code: public Object getOption(int optID) throws SocketException {
          if (isClosed()) {
              throw new SocketException("Socket Closed");
          }
  
          Object result;
  
          switch (optID) {
              case SO_TIMEOUT:
                  result = new Integer(timeout);
                  break;
  
              case IP_TOS:
                  result = socketGetOption(optID);
                  if ( ((Integer)result).intValue() == -1) {
                      result = new Integer(trafficClass);
                  }
                  break;
  
              case SO_BINDADDR:
              case IP_MULTICAST_IF:
              case IP_MULTICAST_IF2:
              case SO_RCVBUF:
              case SO_SNDBUF:
              case IP_MULTICAST_LOOP:
              case SO_REUSEADDR:
              case SO_BROADCAST:
                  result = socketGetOption(optID);
  
                  if (optID == IP_MULTICAST_IF) {
                      return getNIFirstAddress((Integer)result);
                  }
                  break;
  
              default:
                  throw new SocketException("invalid option: " + optID);
          }
  
          return result;
      }
docs: /*
  get option's state - set or not