be.jvb.iptypes

class IpAddress

[source: be/jvb/iptypes/IpAddress.scala]

class IpAddress(val value : Long)
extends be.jvb.iptypes.SmallByteArray
Represents an IPv4 address.
Author
Jan Van Besien
Parameters
value - 32bit value of the ip address (only 32 least significant bits are used)
Direct Known Subclasses:
IpNetworkMask

Additional Constructor Summary
def this (address : java.lang.String) : IpAddress
Construct from a CIDR format string representation (e.g. "192.168.0.1").
def this (inetAddress : java.net.InetAddress) : IpAddress
Construct from a java.net.InetAddress.
Values and Variables inherited from be.jvb.iptypes.SmallByteArray
be.jvb.iptypes.SmallByteArray.maxValue
Method Summary
def + (value : Long) : IpAddress
Addition. Will never overflow, but wraps around when the highest ip address has been reached.
def - (value : Long) : IpAddress
Substraction. Will never underflow, but wraps around when the lowest ip address has been reached.
protected def nBytes : Int
How many bytes do we use (max 8).
protected def radix : be.jvb.iptypes.DEC
In what radix do we represent the bytes when converting to a string.
def toInetAddress : java.net.InetAddress
Convert to java.net.InetAddress.
Methods inherited from be.jvb.iptypes.SmallByteArray
be.jvb.iptypes.SmallByteArray.zeroPaddingUpTo, be.jvb.iptypes.SmallByteArray.toIntArray, be.jvb.iptypes.SmallByteArray.toByteArray, be.jvb.iptypes.SmallByteArray.compare, be.jvb.iptypes.SmallByteArray.equals, be.jvb.iptypes.SmallByteArray.canEqual, be.jvb.iptypes.SmallByteArray.hashCode, be.jvb.iptypes.SmallByteArray.toString
Methods inherited from scala.Ordered
scala.Ordered.<, scala.Ordered.>, scala.Ordered.<=, scala.Ordered.>=, scala.Ordered.compareTo
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Additional Constructor Details
def this(address : java.lang.String) : IpAddress
Construct from a CIDR format string representation (e.g. "192.168.0.1").

def this(inetAddress : java.net.InetAddress) : IpAddress
Construct from a java.net.InetAddress.

Method Details
protected def nBytes : Int
How many bytes do we use (max 8).
Overrides
be.jvb.iptypes.SmallByteArray.be.jvb.iptypes.SmallByteArray.nBytes

protected def radix : be.jvb.iptypes.DEC
In what radix do we represent the bytes when converting to a string.
Overrides
be.jvb.iptypes.SmallByteArray.be.jvb.iptypes.SmallByteArray.radix

def +(value : Long) : IpAddress
Addition. Will never overflow, but wraps around when the highest ip address has been reached.

def -(value : Long) : IpAddress
Substraction. Will never underflow, but wraps around when the lowest ip address has been reached.

def toInetAddress : java.net.InetAddress
Convert to java.net.InetAddress.


Copyright (c) 2010. All Rights Reserved.