Returns true if Bits of Binary is supported by the server.

@return true if Bits of Binary is supported by the server.
@throws NoResponseException
@throws XMPPErrorException
@throws NotConnectedException
@throws InterruptedException
762309
public boolean isSupportedByServer()
            throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        return ServiceDiscoveryManager.getInstanceFor(connection()).serverSupportsFeature(NAMESPACE);
    }
1321688
public static function is_binary_data($data)
    {
        if (preg_match('!!u', $data)) {
            return false;
        }
        $characters = str_split($data);
        foreach ($characters as $character) {
            $ord_value = ord($character);
            if ($ord_value < 0x20 or $ord_value >= 0x7f) {
                return true;
            }
        }
        return false;
    }
903162
private boolean supportsConnects(String serviceType) {
        return !serviceType.equals("jms") &&
                !serviceType.equals("echo") &&
                !serviceType.equals("management.jmx") &&
                !serviceType.equals("$management.jmx$") &&
                !serviceType.equals("management.snmp") &&
                !serviceType.equals("$management.snmp$") &&
                !serviceType.equals("directory");
    }
611208
public boolean isSyncCurrentPosition(int syncmode) throws BitstreamException
	{
		int read = readBytes(syncbuf, 0, 4);
		int headerstring = ((syncbuf[0] << 24) & 0xFF000000) | ((syncbuf[1] << 16) & 0x00FF0000) | ((syncbuf[2] << 8) & 0x0000FF00) | ((syncbuf[3] << 0) & 0x000000FF);

		try
		{
			source.unread(syncbuf, 0, read);
		}
		catch (IOException ex)
		{
		}

		boolean sync = false;
		switch (read)
		{
			case 0:
				sync = true;
				break;
			case 4:
				sync = isSyncMark(headerstring, syncmode, syncword);
				break;
		}

		return sync;
	}
804502
public function isNegative( $binaryString ){
        $firstBit = $binaryString[0];
        $negativeFlag = $firstBit & "\x80";
        $isNegative = ord($negativeFlag) == 128;
        return $isNegative;
    }
918555
@Override
    public boolean isCDIEnabled(String bdaId) {

        boolean hasBeans = false;

        //the top level isCDIEnabled can fail faster
        if (isCDIEnabled()) {
            Boolean hasBeansBoolean = cdiStatusMap.get(bdaId);
            if (hasBeansBoolean == null) {
                WebSphereBeanDeploymentArchive bda = deploymentDBAs.get(bdaId);
                if (bda == null) {
                    // turns out that JAXWS create modules dynamically at runtime. That should be the only way
                    // that there is no bda for a valid module/bda id. At the moment, CDI is not supported in
                    // a module unless it exists at startup.
                    hasBeans = false;
                } else {
                    hasBeans = isCDIEnabled(bda);
                }
            } else {
                hasBeans = hasBeansBoolean;
            }
        }

        return hasBeans;
    }
1023702
public boolean getBoolean() {
        byte result = buffer.getByte(index + offset);
        index += Bits.BYTE_SIZE_IN_BYTES;
        return result != 0;
    }
296911
private boolean isPayloadTooLong() {
		try {
			byte[] bytes = getPayloadAsBytesUnchecked();
			if (bytes.length > getMaximumPayloadSize()) return true;
		} catch (Exception e) {
		}
		return false;
	}
1065394
private BinaryResponse readBinaryResponse() throws IOException {
		BinaryResponse response = new BinaryResponse();
		response.setResponseCode(connection.getResponseCode());
		response.setResponseMessage(connection.getResponseMessage());
		response.setHeaders(connection.getHeaderFields());
		try {
			response.setBinaryBody(getBinaryFromStream(connection.getInputStream()));
		} catch (IOException e) {
			response.setBinaryBody(getBinaryFromStream(connection.getErrorStream()));
		}
		return response;
	}
1038482
protected function isBinaryAvailable(): bool
    {
        if (OsHelper::isUnix()) {
            // Do not use the 'which' program to check if a binary exists.
            // See also http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
            $process = new Process([
                'sh',
                '-c',
                'command -v $0',
                $this->getBinary(),
            ]);
        } else {
            // 'where' is available on Windows since Server 2003
            $process = new Process([
                'where',
                $this->getBinary(),
            ]);
        }

        $process->run();

        return $process->isSuccessful();
    }
523978
private static function check_64_bit()
  {
    if (8 != PHP_INT_SIZE)
      if (extension_loaded('gmp'))
        self::$biginteger_mode = self::GMP_BIGINTEGER_MODE;
      else
        throw new AvroException('This platform cannot handle a 64-bit operations. '
                                . 'Please install the GMP PHP extension.');
    else
      self::$biginteger_mode = self::PHP_BIGINTEGER_MODE;

  }
1139077
private static boolean isExtendedWebpSupported() {
    // Lossless and extended formats are supported on Android 4.2.1+
    // Unfortunately SDK_INT is not enough to distinguish 4.2 and 4.2.1
    // (both are API level 17 (JELLY_BEAN_MR1))
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
      return false;
    }

    if (Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_BEAN_MR1) {
      // Let's test if extended webp is supported
      // To this end we will try to decode bounds of vp8x webp with alpha channel
      byte[] decodedBytes = Base64.decode(VP8X_WEBP_BASE64, Base64.DEFAULT);
      BitmapFactory.Options opts = new BitmapFactory.Options();
      opts.inJustDecodeBounds = true;
      BitmapFactory.decodeByteArray(decodedBytes, 0, decodedBytes.length, opts);

      // If Android managed to find appropriate decoder then opts.outHeight and opts.outWidth
      // should be set. We can not assume that outMimeType is set.
      // Android guys forgot to update logic for mime types when they introduced support for webp.
      // For example, on 4.2.2 this field is not set for webp images.
      if (opts.outHeight != 1 || opts.outWidth != 1) {
        return false;
      }
    }

    return true;
  }
136653
public boolean hasNext() throws SISessionUnavailableException, SISessionDroppedException, SIIncorrectCallException
  {
    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.entry(CoreSPILockedMessageEnumeration.tc, "hasNext",
        new Object[] {new Integer(hashCode()), this});

    boolean hasNext = false;

    checkValidState("hasNext");

    localConsumerPoint.checkNotClosed();

    synchronized(this)
    {
      if(!endReached)
      {
        // If currentMsg is null it means we start from the begining
        if(currentMsg == null)
        {
          if(firstMsg != null)
            hasNext = true;
        }
        else
        {
          if(currentMsg.next != null)
            hasNext = true;
        }
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.exit(CoreSPILockedMessageEnumeration.tc, "hasNext", new Boolean(hasNext));

    return hasNext;
  }
937297
@Override
  public boolean isSSPISupported() {
    try {
      /*
       * SSPI is windows-only. Attempt to use JNA to identify the platform. If Waffle is missing we
       * won't have JNA and this will throw a NoClassDefFoundError.
       */
      if (!Platform.isWindows()) {
        LOGGER.log(Level.FINE, "SSPI not supported: non-Windows host");
        return false;
      }
      /* Waffle must be on the CLASSPATH */
      Class.forName("waffle.windows.auth.impl.WindowsSecurityContextImpl");
      return true;
    } catch (NoClassDefFoundError ex) {
      LOGGER.log(Level.WARNING, "SSPI unavailable (no Waffle/JNA libraries?)", ex);
      return false;
    } catch (ClassNotFoundException ex) {
      LOGGER.log(Level.WARNING, "SSPI unavailable (no Waffle/JNA libraries?)", ex);
      return false;
    }
  }
748547
public boolean isSupported(Jid jid) throws SmackException, XMPPException, InterruptedException {
        return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid,
                        DeliveryReceipt.NAMESPACE);
    }
343244
public function parseEncodedBinary()
    {
        $f = ord($this->read(1));
        if ($f <= 250) {
            return $f;
        }
        if ($f === 251) {
            return null;
        }
        if ($f === 255) {
            return false;
        }
        if ($f === 252) {
            return Binary::bytes2int($this->read(2), true);
        }
        if ($f === 253) {
            return Binary::bytes2int($this->read(3), true);
        }
        return Binary::bytes2int($this->read(8), true);
    }
860563
def is_binary(filename):
    
    with open(filename, 'rb') as fp:
        data = fp.read(1024)
        if not data:
            return False
        if b'\0' in data:
            return True
        return False