-
- All Implemented Interfaces:
public class LongTermCredentialRepresents a STUN long-term credential.
-
-
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.
-
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 StringtoString(Array<byte> bytes)Constructs a new String by decoding a specific array of bytes using the UTF-8 charset. inthashCode()booleanequals(Object o)-
-
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 withpassword- 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
-
hashCode
int hashCode()
-
-
-
-