ipaddress.js
No description.

File Location

/goog/net/ipaddress.js

Classes

goog.net.IpAddress
Abstract class defining an IP Address. Please use goog.net.IpAddress static methods or goog.net.Ipv4Address/Ipv6Address classes.
goog.net.Ipv4Address
Takes a string or a number and returns a IPv4 Address. This constructor accepts strings and instance of goog.math.Integer. If you pass a goog.math.Integer, make sure that its sign is set to positive.
goog.net.Ipv6Address
Takes a string or a number and returns an IPv6 Address. This constructor accepts strings and instance of goog.math.Integer. If you pass a goog.math.Integer, make sure that its sign is set to positive.

Public Protected Private

Global Functions

goog.net.Ipv6Address.compress_(hextets) !Array.<string>
This method is in charge of compressing an expanded IPv6 array of hextets.
Arguments:
hextets : !Array.<string>
The array of hextet.
Returns: !Array.<string>  The compressed version of this array.
code »
goog.net.Ipv6Address.dottedQuadtoHextets_(quads) !Array.<string>
This method will convert an IPv4 to a list of 2 hextets. For instance, 1.2.3.4 will be converted to ['0102', '0304'].
Arguments:
quads : string
An IPv4 as a string.
Returns: !Array.<string>  A list of 2 hextets.
code »
goog.net.Ipv6Address.explode_(address) !Array.<string>
This method is in charge of expanding/exploding an IPv6 string from its compressed form.
Arguments:
address : !Array.<string>
An IPv6 address split around '::'.
Returns: !Array.<string>  The expanded version of the IPv6.
code »
goog.net.IpAddress.fromString(address) goog.net.IpAddress
Parses an IP Address in a string. If the string is malformed, the function will simply return null instead of raising an exception.
Arguments:
address : string
The IP Address.
Returns: goog.net.IpAddress  The IP Address or null.
code »
goog.net.IpAddress.fromUriString(address) goog.net.IpAddress
Tries to parse a string represented as a host portion of an URI. See RFC 3986 for more details on IPv6 addresses inside URI. If the string is malformed, the function will simply return null instead of raising an exception.
Arguments:
address : string
A RFC 3986 encoded IP address.
Returns: goog.net.IpAddress  The IP Address.
code »

Directory net

File Reference