ip-num
    Preparing search index...

    Class Octet

    A binary representation of a 8 bit value.

    {@see https://en.wikipedia.org/wiki/Octet_(computing)} for more information on Octets

    An octet is used in the textual representation of an IPv4 number, where the IP number value is divided into 4 octets

    Index

    Constructors

    • Constructor for creating an instance of an Octet.

      The constructor parameter given could either be a string or number.

      If a string, it is the string representation of the numeric value of the octet If a number, it is the numeric representation of the value of the octet

      Parameters

      • givenValue: string | number

        value of the octet to be created.

      Returns Octet

    Methods

    • Method to get the numeric value of the octet

      Returns number

      the numeric value of the octet

    • Returns a decimal representation of the value of the octet in string

      Returns string

      a decimal representation of the value of the octet in string

    • Convenience method for creating an Octet out of a numeric value representing the value of the octet

      Parameters

      • rawValue: number

        the octet value in number

      Returns Octet

      the Octet instance

    • Convenience method for creating an Octet out of a string value representing the value of the octet

      Parameters

      • rawValue: string

        the octet value in string

      Returns Octet

      the Octet instance