XBinder C# Runtime Library  2.8
Static Public Member Functions | Static Public Attributes | List of all members
com.objsys.xbinder.runtime.XBUtil Class Reference

This class contains some general purpose static utility functions. More...

Static Public Member Functions

static System.String toHexString (sbyte b)
 Convert a byte value to a hex string. Unlike the Java built-in function, this will: More...
 
static System.Text.StringBuilder toHexString (sbyte b, System.Text.StringBuilder hexbuf)
 Convert a byte value to a hex string. Unlike the Java built-in function, this will: More...
 
static System.String toHexString (sbyte[] b, int offset, int nbytes)
 Convert a string of bytes into a hex string. More...
 
static double log2 (double val)
 Calculate the log base 2 of value More...
 
static void indent (TextWriter _out, int level)
 This method will indent three spaces in the given print stream. It is used by the print methods to provide a formatted output of an encoded element value. More...
 

Static Public Attributes

static byte [] license
 License data. Only evaluation runtimes require this to be non-null. Non-evaluation runtimes are unlimited and don't require license data. The field is present in all runtimes so that code generated with an evaluation compiler can be compiled against an unlimited runtime. More...
 

Detailed Description

This class contains some general purpose static utility functions.

Member Function Documentation

◆ indent()

static void com.objsys.xbinder.runtime.XBUtil.indent ( TextWriter  _out,
int  level 
)
static

This method will indent three spaces in the given print stream. It is used by the print methods to provide a formatted output of an encoded element value.

Parameters
_outThe TextWriter instance to use.
levelThe number of spaces to indent.

◆ log2()

static double com.objsys.xbinder.runtime.XBUtil.log2 ( double  val)
static

Calculate the log base 2 of value

Parameters
valdouble value for which to count lag(base2) val.
Returns
result value.

◆ toHexString() [1/3]

static System.String com.objsys.xbinder.runtime.XBUtil.toHexString ( sbyte  b)
static

Convert a byte value to a hex string. Unlike the Java built-in function, this will:

a. not sign extend the byte value out to 32 bits if the MSB is set, and b. put a zero padding byte in front if less than 0xf

In other words, a character string of length 2 is always returned.

◆ toHexString() [2/3]

static System.Text.StringBuilder com.objsys.xbinder.runtime.XBUtil.toHexString ( sbyte  b,
System.Text.StringBuilder  hexbuf 
)
static

Convert a byte value to a hex string. Unlike the Java built-in function, this will:

a. not sign extend the byte value out to 32 bits if the MSB is set, and b. put a zero padding byte in front if less than 0xf

In other words, a character string of length 2 is always returned.

◆ toHexString() [3/3]

static System.String com.objsys.xbinder.runtime.XBUtil.toHexString ( sbyte []  b,
int  offset,
int  nbytes 
)
static

Convert a string of bytes into a hex string.

Member Data Documentation

◆ license

byte [] com.objsys.xbinder.runtime.XBUtil.license
static

License data. Only evaluation runtimes require this to be non-null. Non-evaluation runtimes are unlimited and don't require license data. The field is present in all runtimes so that code generated with an evaluation compiler can be compiled against an unlimited runtime.