Package 

Class LongTermCredential

  • All Implemented Interfaces:

    
    public class LongTermCredential
    
                        

    Represents a STUN long-term credential.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      LongTermCredential(Array<byte> username, Array<byte> password) Initializes a new LongTermCredential instance with a specific username and a specific password.
      LongTermCredential(String username, String password) Initializes a new LongTermCredential instance with a specific username and a specific password.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Array<byte> getPassword() Gets the password of this LongTermCredential.
      Array<byte> getUsername() Gets the username of this LongTermCredential.
      static Array<byte> getBytes(String s) Encodes a specific String into a sequence of bytes using the UTF-8 charset, storing the result into a new byte array.
      static String toString(Array<byte> bytes) Constructs a new String by decoding a specific array of bytes using the UTF-8 charset.
      int hashCode()
      boolean equals(Object o)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LongTermCredential

        LongTermCredential(Array<byte> username, Array<byte> password)
        Initializes a new LongTermCredential instance with a specific username and a specific password.
        Parameters:
        username - the username to initialize the new instance with
        password - the password to initialize the new instance with
      • LongTermCredential

        LongTermCredential(String username, String password)
        Initializes a new LongTermCredential instance with a specific username and a specific password.
        Parameters:
        username - the username to initialize the new instance with
        password - the password to initialize the new instance with
    • Method Detail

      • getPassword

         Array<byte> getPassword()

        Gets the password of this LongTermCredential.

      • getUsername

         Array<byte> getUsername()

        Gets the username of this LongTermCredential.

      • getBytes

         static Array<byte> getBytes(String s)

        Encodes a specific String into a sequence of bytes using the UTF-8 charset, storing the result into a new byte array.

        Parameters:
        s - the String to encode
      • toString

         static String toString(Array<byte> bytes)

        Constructs a new String by decoding a specific array of bytes using the UTF-8 charset. The length of the new String is a function of the charset, and hence may not be equal to the length of the byte array.

        Parameters:
        bytes - the bytes to be decoded into characters