com.pingidentity.sts.clientapi.utils
Class ClientUtils

java.lang.Object
  extended by com.pingidentity.sts.clientapi.utils.ClientUtils

public class ClientUtils
extends java.lang.Object

Utility class for generation of special elements for xml documents.


Constructor Summary
ClientUtils()
           
 
Method Summary
static java.lang.String createIdentifier()
          This method returns a string is to be used as an identifer (http://www.w3.org/TR/xml11/#id) for an xml document - all the entries in the Base64 encoding table fit this definition with the exception of 62 (+) and 63 (/), which are account for and parsed out in the method implementation.
static byte[] generateBytes(int length)
          Generates random sequence of bytes in the byte array of the specified length.
static java.util.TimeZone getUtcTimeZone()
          Getting the timezone for UTC.
static java.lang.String nowUtc()
           
static java.lang.String nowUtcPlus(int offset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientUtils

public ClientUtils()
Method Detail

getUtcTimeZone

public static java.util.TimeZone getUtcTimeZone()
Getting the timezone for UTC.

Returns:
TimeZone.

createIdentifier

public static java.lang.String createIdentifier()
This method returns a string is to be used as an identifer (http://www.w3.org/TR/xml11/#id) for an xml document - all the entries in the Base64 encoding table fit this definition with the exception of 62 (+) and 63 (/), which are account for and parsed out in the method implementation. However, should this method use something other than the Base64 encoding table, the unit test should be updated to check for conformance against the xml identifier specification.

Returns:
String.

generateBytes

public static byte[] generateBytes(int length)
Generates random sequence of bytes in the byte array of the specified length.

Parameters:
length - the length of bytes to generate.
Returns:
byte[].

nowUtc

public static java.lang.String nowUtc()

nowUtcPlus

public static java.lang.String nowUtcPlus(int offset)


Copyright © 2006-2009 Ping Identity Corporation. All Rights Reserved.