code: public int getCloseCode()
      {
          if (mPayload == null || mPayload.length < 2)
          {
              return WebSocketCloseCode.NONE;
          }
  
          // A close code is encoded in network byte order.
          int closeCode = (((mPayload[0] & 0xFF) << 8) | (mPayload[1] & 0xFF));
  
          return closeCode;
      }
docs: Parse the first two bytes of the payload as a close code.
  
  <p>
  If any payload is not set or the length of the payload is less than 2,
  this method returns 1005 ({@link WebSocketCloseCode#NONE}).
  </p>
  
  <p>
  The value returned from this method is meaningless if this frame
  is not a close frame.
  </p>
  
  @return
  The close code.
  
  @see <a href="http://tools.ietf.org/html/rfc6455#section-5.5.1"
  >RFC 6455, 5.5.1. Close</a>
  
  @see WebSocketCloseCode