TibrvIPAddr()

Constructor

Declaration

TibrvIPAddr(byte[] bytes)
TibrvIPAddr(
    java.net.InetAddress inetAddr)
TibrvIPAddr(
    byte b1,
    byte b2,
    byte b3,
    byte b4)
TibrvIPAddr(
    java.lang.String ipString)
  throws java.lang.NumberFormatException
TibrvIPAddr(int address)
TibrvIPAddr(TibrvIPAddr ipAddr)

Purpose

Create an IP address object.

Parameter

Description

bytes

Create an IP address from an array of 4 bytes. For aaa.bbb.ccc.ddd, let bytes[0] be the high byte aaa, and bytes[3] be the low byte ddd.

b1, b2, b3, b4

Create an IP address from these 4 bytes. For aaa.bbb.ccc.ddd, let b1 be the high byte aaa, and b4 be the low byte ddd.

address

Create an IP address from a 32-bit integer, interpreted as 4 bytes in network byte order.

ipString

Create an IP address from a string representation (for example, "aaa.bbb.ccc.ddd").

inetAddr

Copy this Java 4-byte Internet address into a TibrvIPAddr object with an equivalent value. (TibrvIPAddr supports only 4-byte IP addresses.)

ipAddr

Make an independent copy of this TibrvIPAddr object.

Remarks

If the ipString argument does not represent a valid IP address, this constructor throws a java.lang.NumberFormatException.