congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Subnet.toSubnet
Code IndexAdd Tabnine to your IDE (free)

How to use
toSubnet
method
in
org.apache.mina.filter.firewall.Subnet

Best Java code snippets using org.apache.mina.filter.firewall.Subnet.toSubnet (Showing top 3 results out of 315)

origin: kaazing/gateway

/**
 * Checks if the {@link InetAddress} is within this subnet
 * @param address The {@link InetAddress} to check
 * @return True if the address is within this subnet, false otherwise
 */
public boolean inSubnet(InetAddress address) {
  return toSubnet(address) == subnetInt;
}
origin: org.apache.mina/mina-core

/**
 * Checks if the {@link InetAddress} is within this subnet
 * @param address The {@link InetAddress} to check
 * @return True if the address is within this subnet, false otherwise
 */
public boolean inSubnet(InetAddress address) {
  if (address.isAnyLocalAddress()) {
    return true;
  }
  if (address instanceof Inet4Address) {
    return (int) toSubnet(address) == subnetInt;
  } else {
    return toSubnet(address) == subnetLong;
  }
}
origin: org.apache.directory.api/api-ldap-client-all

/**
 * Checks if the {@link InetAddress} is within this subnet
 * @param address The {@link InetAddress} to check
 * @return True if the address is within this subnet, false otherwise
 */
public boolean inSubnet(InetAddress address) {
  if (address.isAnyLocalAddress()) {
    return true;
  }
  if (address instanceof Inet4Address) {
    return (int) toSubnet(address) == subnetInt;
  } else {
    return toSubnet(address) == subnetLong;
  }
}
org.apache.mina.filter.firewallSubnettoSubnet

Javadoc

Converts an IP address to a subnet using the provided mask

Popular methods of Subnet

  • <init>
    Creates a subnet from CIDR notation. For example, the subnet 192.168.0.0/24 would be created using t
  • inSubnet
    Checks if the InetAddress is within this subnet
  • toInt
    Converts an IP address into an integer
  • toLong
    Converts an IP address into a long

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (Timer)
  • putExtra (Intent)
  • Menu (java.awt)
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JButton (javax.swing)
  • JFileChooser (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now