Metered

Inheritance: java.lang.Object

public class Metered

Provides methods to set metered key.

Learn more

The example demonstrates a typical usage of the class.


 try {
     Metered metered = new Metered();
     metered.setMeteredKey("PublicKey", "PrivateKey");
 }
 catch (java.lang.Exception ex) {
     // ...
 }
 

Constructors

Constructor Description
Metered() Initializes a new instance of this class.

Methods

Method Description
setMeteredKey(String publicKey, String privateKey) Sets metered public and private key
getConsumptionQuantity() Gets consumption file size
getConsumptionCredit() Gets consumption credit

Metered()

public Metered()

Initializes a new instance of this class.

setMeteredKey(String publicKey, String privateKey)

public void setMeteredKey(String publicKey, String privateKey)

Sets metered public and private key

Parameters:

Parameter Type Description
publicKey java.lang.String public key
privateKey java.lang.String private key

getConsumptionQuantity()

public static double getConsumptionQuantity()

Gets consumption file size

Returns: double - consumption quantity

getConsumptionCredit()

public static double getConsumptionCredit()

Gets consumption credit

Returns: double - consumption quantity