Skip to content
forked from abedra/orchard

A CIDR processing library for Java. Supports IPv4 and IPv6

License

Notifications You must be signed in to change notification settings

prokopowicz/orchard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orchard Build Status License

A CIDR processing library for Java. Supports IPv4 and IPv6 Addresses.

Installation

<dependency>
    <groupId>com.aaronbedra</groupId>
    <artifactId>orchard</artifactId>
    <version>0.1.1</version>
</dependency>

Usage

import com.aaronbedra.orchard.CIDR;

if (CIDR.valueOf("1.1.1.0/24").contains("1.1.1.2")) {
  // do stuff
} else {
  // do other stuff
}
import com.aaronbedra.orchard.CIDR;

int mask = CIDR.valueOf("1.1.1.0/24").getMask();

About

A CIDR processing library for Java. Supports IPv4 and IPv6

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%