1 Calendar

Class Ax.util.Calendar


This objects are DataTypes. Don't extend AbstractScriptClass

Constructor Summary

Method
Description
Creates a new Calendar instance with the current date and time.

Method Summary

Modifier and Type
Method
Description
void 
add(int type, int value)
Adds the given amount to the field.
int 
get(int field)
Gets the selected field from the calendar.
Date 
Gets the calendar time as a Date object.
long 
Returns the calendar time in milliseconds since Epoch (January 1, 1970).
void 
roll(int field, boolean up)
Adds/substracts a single unit of time to the field.
void 
roll(int field,int ammount)
Adds the given amount to the field.
void 
set(int type, int value)
Sets the field with the given value.
void 
set(int year,int month,int date)
Sets the year, month and day of the calendar time.
void 
set(int year, int month, int date, int hourOfDay, int minute)
Sets the year, month, day, hour and minute to the calendar time.
void 
set(int year,int month,int date,int hourOfDay,int minute,int second)
Sets the year, month, day, hour, minute and second to the calendar time.

Constructor Detail

Ax.util.Calendar.JSCalendar

Ax.util.Calendar.JSCalendar()
Info:
Creates a new Calendar instance with the current date and time.

Example
Copy
var cal = new Ax.util.Calendar();

Method Detail

Ax.util.Calendar.add

null Ax.util.Calendar.add(
	smallint type,
	smallint value
)
Info:
Adds the given amount to the field. This method can modify larger fields.
Parameters:
type - the field to add
value - the amount to add
Returns:
null

Ax.util.Calendar.get

smallint Ax.util.Calendar.get(
	smallint field
)
Info:
Gets the selected field from the calendar.
Parameters:
field - the field to get, like Ax.util.Calendar.YEAR
Returns:
smallint

Example
Copy
cal.get(Ax.util.Calendar.YEAR);

Ax.util.Calendar.getTime

date Ax.util.Calendar.getTime()
Info:
Gets the calendar time as a Date object.
Returns:
date

Ax.util.Calendar.getTimeIMillis

long Ax.util.Calendar.getTimeIMillis()
Info:
Returns the calendar time in milliseconds since Epoch (January 1, 1970).
Returns:
long

Ax.util.Calendar.roll

null Ax.util.Calendar.roll(
	smallint field,
	boolean up
)
Info:
Adds/substracts a single unit of time to the field.
Parameters:
field - the field to update
up - whether to add (true) or subtract (false) a unit of time
Returns:
null

Ax.util.Calendar.roll

null Ax.util.Calendar.roll(
	smallint field,
	smallint ammount
)
Info:
Adds the given amount to the field. A negative value means that the amount will be subtracted. This method does not modify larger fields.
Parameters:
field - the field to update
ammount - the amount to add/subtract
Returns:
null

Ax.util.Calendar.set

null Ax.util.Calendar.set(
	smallint type,
	smallint value
)
Info:
Sets the field with the given value.
Parameters:
type - the field to set
value - the value to set
Returns:
null

Ax.util.Calendar.set

null Ax.util.Calendar.set(
	smallint year,
	smallint month,
	smallint date
)
Info:
Sets the year, month and day of the calendar time.
Parameters:
year - the year to set
month - the month to set
date - the day to set
Returns:
null

Ax.util.Calendar.set

null Ax.util.Calendar.set(
	smallint year,
	smallint month,
	smallint date,
	smallint hourOfDay,
	smallint minute
)
Info:
Sets the year, month, day, hour and minute to the calendar time.
Parameters:
year - the year to set
month - the month to set
date - the day to set
hourOfDay - the hour to set
minute - the minute to set
Returns:
null

Ax.util.Calendar.set

null Ax.util.Calendar.set(
	smallint year,
	smallint month,
	smallint date,
	smallint hourOfDay,
	smallint minute,
	smallint second
)
Info:
Sets the year, month, day, hour, minute and second to the calendar time.
Parameters:
year - the year to set
month - the month to set
date - the day to set
hourOfDay - the hour to set
minute - the minute to set
second - the second to set
Returns:
null

2 Date

Class Ax.sql.Date


A java.sql.Date wrapper It us useful to create native SQL objects ready to be passed to JDBC In pivot, for example it has been necessary to generate output columns compatible with SQL date. If java date was used, teh toString() representation is not compatible (YYYY-MM-DD vs Tue Sep 06 12:00:00 CEST 2022)

Constructor Summary

Method
Description
Creates a new Date instance with the current time.
JSSQLDate(long time)
JSSQLDate(Object argument)
Creates a new Date instance with the given argument.
JSSQLDate(int y, int m, int d)
Creates a new date instance with the given year, month and day.

Method Summary

Modifier and Type
Method
Description
long 
UTC(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5)
int 
__getDateFullYear(int year)
long 
add(int field,int amount)
Adds the given amount to the defined field in the date, returning a new one.
addDay(int amount)
Adds the number of days specified to date object returning a new one.
addHour(int amount)
Adds the number of hours specified to date object returning a new one.
addMillisecond(int amount)
Adds the number of milliseconds specified to date object returning a new one.
addMinute(int amount)
Adds the number of minutes specified to date object returning a new one.
addMonth(int amount)
Adds the number of months specified to date object returning a new one.
addSecond(int amount)
Adds the number of seconds specified to date object returning a new one.
addYear(int amount)
Adds the number of years specified to date object returning a new one.
boolean 
after(Date arg0)
boolean 
Checks if this date is after the given date.
boolean 
before(Date arg0)
boolean 
Checks if this date is before the given date.
Clear the time part (hours to milliseconds) from date, that is, set them to 0.
clone()
int 
compareTo(Date arg0)
Ax.sql.Date 
convertTimeZone(Ax.text.String from, Ax.text.String to)
Converts from one timezone to another.
long 
days(IDate d2)
Returns the difference between the two given dates in days.
duration(Date d2)
Returns the Duration between the two given dates.
boolean 
equals(Object arg0)
Ax.text.String 
format(Ax.text.String format)
Returns a string with the date in the specified format.
Ax.text.String 
format(Ax.text.String format,Ax.text.String language)
Returns a string with the date in the specified format and localized for the given language.
void 
formatDecimalInt(int arg0, char[] arg1, int arg2, int arg3)
Date 
from(Instant arg0)
int 
int 
Gets the year of the date.
int 
Gets the year of the date.
int 
getDay()
int 
Gets the year of the date.
int 
int 
long 
getMillisOf(Date arg0)
int 
int 
int 
int 
int 
long 
Ax.text.String 
Returns the timezone date is represented in.
int 
int 
Gets the year of the date.
int 
int 
long 
hours(Date d2)
Returns the difference between the two given dates in hours.
internalCreateDate(long timeInMillis)
Create the date type required
Date 
int 
boolean 
long 
millis(Date d2)
Returns the difference between the two given dates in milliseconds.
long 
minutes(Date d2)
Returns the difference between the two given dates in minutes.
long 
months(IDate d2)
Returns the difference between the two given dates in months.
long 
parse(Ax.text.String arg0)
long 
seconds(Date d2)
Returns the difference between the two given dates in seconds.
set(int field,int value)
Sets the given value to the defined field in the date, returning a new one.
Ax.sql.Date 
setConnection(Ax.db conn)
Setups a database connection to format the date accordingly.
Ax.sql.Date 
Setups a database connection to format the date accordingly.
void 
setDate(int arg0)
void 
setHours(int arg0)
void 
setHours(int arg0)
void 
setMinutes(int arg0)
void 
setMinutes(int arg0)
void 
setMonth(int arg0)
void 
setSeconds(int arg0)
void 
setSeconds(int arg0)
void 
setTime(long arg0)
void 
setTime(long arg0)
Ax.sql.Date 
setTimeZone(Ax.text.String to)
Sets the date timezone.
void 
setYear(int arg0)
Converts the date to a Calendar object.
Ax.text.String 
Ax.text.String 
Returns the Duration in human readable format as a String with format like "2 d 20:14:56" or "20:14:56" when days are 0.
Ax.text.String 
Returns the date formated as ISO_8601 ("yyyy-MM-dd") without time part.
Date 
To be used when a native java.
Converts the date to the system's timezone.
Ax.text.String 
Ax.text.String 
Returns the date formated as the SQL agent requires.
Ax.text.String 
Converts the date to a human-readable string or database format.
Ax.text.String 
Ax.text.String 
Date 
valueOf(Ax.text.String arg0)
Date 
long 
weeks(IDate d2)
Returns the difference between the two given dates in weeks.
long 
years(IDate d2)
Returns the difference between the two given dates in years.

Constructor Detail

Ax.sql.Date.JSSQLDate

Ax.sql.Date.JSSQLDate()
Info:
Creates a new Date instance with the current time.

Example
Copy
var current = new Ax.sql.Date();
 current.setConnection(Ax.db);

Ax.sql.Date.JSSQLDate

Ax.sql.Date.JSSQLDate(
	long time
						)
Parameters:
time - 

Ax.sql.Date.JSSQLDate

Ax.sql.Date.JSSQLDate(
	object argument
						)
Info:
Creates a new Date instance with the given argument. The argument can be: 1. Numeric (like Long or Double): milliseconds since January 1, 1970, 00:00:00. 2. javascript Dates.
Parameters:
argument - 

Ax.sql.Date.JSSQLDate

Ax.sql.Date.JSSQLDate(
	smallint y,
	smallint m,
	smallint d
						)
Info:
Creates a new date instance with the given year, month and day. The time (hh:mm:ss) part of the date is set to midnight, at the beginning of the day d.
Parameters:
y - the year
m - 1-based month
d - 1-based day

Example
Copy
function __test (param1, param2){
       let x1 = param1 +1;
       let x2 = param2.addMonth(1);
  }

  var testunit = [
             { field1 : 1, field2 : new Ax.sql.Date()}
             ];

  for (var row of testunit) {
       console.log(row)
       __test(row.field1, row.field2);
       console.log(row)
  }

Method Detail

Ax.sql.Date.UTC

long Ax.sql.Date.UTC(
	smallint arg0,
	smallint arg1,
	smallint arg2,
	smallint arg3,
	smallint arg4,
	smallint arg5
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
arg3 - 
arg4 - 
arg5 - 
Returns:
long

Ax.sql.Date.__getDateFullYear

smallint Ax.sql.Date.__getDateFullYear(
	smallint year
)
Parameters:
year - 
Returns:
smallint

Ax.sql.Date.__getTimeFromArgument

long Ax.sql.Date.__getTimeFromArgument(
	object arg
)
Parameters:
arg - 
Returns:
long

Ax.sql.Date.add

object Ax.sql.Date.add(
	smallint field,
	smallint amount
)
Info:
Adds the given amount to the defined field in the date, returning a new one. The field is a Ax.util.Calendar fields.
Parameters:
field - the field to add the amount to
amount - the amount to add
Returns:
object

Ax.sql.Date.addDay

object Ax.sql.Date.addDay(
	smallint amount
)
Info:
Adds the number of days specified to date object returning a new one.
Parameters:
amount - the amount to add
Returns:
object

Ax.sql.Date.addHour

object Ax.sql.Date.addHour(
	smallint amount
)
Info:
Adds the number of hours specified to date object returning a new one.
Parameters:
amount - the amount to add
Returns:
object

Ax.sql.Date.addMillisecond

object Ax.sql.Date.addMillisecond(
	smallint amount
)
Info:
Adds the number of milliseconds specified to date object returning a new one.
Parameters:
amount - the amount to add
Returns:
object

Ax.sql.Date.addMinute

object Ax.sql.Date.addMinute(
	smallint amount
)
Info:
Adds the number of minutes specified to date object returning a new one.
Parameters:
amount - the amount to add
Returns:
object

Ax.sql.Date.addMonth

object Ax.sql.Date.addMonth(
	smallint amount
)
Info:
Adds the number of months specified to date object returning a new one.
Parameters:
amount - the amount to add
Returns:
object

Ax.sql.Date.addSecond

object Ax.sql.Date.addSecond(
	smallint amount
)
Info:
Adds the number of seconds specified to date object returning a new one.
Parameters:
amount - the amount to add
Returns:
object

Ax.sql.Date.addYear

object Ax.sql.Date.addYear(
	smallint amount
)
Info:
Adds the number of years specified to date object returning a new one.
Parameters:
amount - the amount to add
Returns:
object

Ax.sql.Date.after

boolean Ax.sql.Date.after(
	date arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.sql.Date.afterOrEqual

boolean Ax.sql.Date.afterOrEqual(
	date d
)
Info:
Checks if this date is after the given date.
Parameters:
d - the date to compare with
Returns:
boolean

Ax.sql.Date.before

boolean Ax.sql.Date.before(
	date arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.sql.Date.beforeOrEqual

boolean Ax.sql.Date.beforeOrEqual(
	date d
)
Info:
Checks if this date is before the given date.
Parameters:
d - the date to compare with
Returns:
boolean

Ax.sql.Date.clearTime

object Ax.sql.Date.clearTime()
Info:
Clear the time part (hours to milliseconds) from date, that is, set them to 0.
Returns:
object

Ax.sql.Date.clone

object Ax.sql.Date.clone()
Returns:
object

Ax.sql.Date.compareTo

smallint Ax.sql.Date.compareTo(
	date arg0
)
Parameters:
arg0 - 
Returns:
smallint

Ax.sql.Date.convertTimeZone

object Ax.sql.Date.convertTimeZone(
	string from,
	string to
)
Info:
Converts from one timezone to another.
Parameters:
from - the timezone to convert from, like "Europe/London"
to - the timezone to convert to, like "Europe/London"
Returns:
object

Ax.sql.Date.days

long Ax.sql.Date.days(
	object d2
)
Info:
Returns the difference between the two given dates in days.
Parameters:
d2 - the second date to compare
Returns:
long

Ax.sql.Date.duration

object Ax.sql.Date.duration(
	date d2
)
Info:
Returns the Duration between the two given dates.
Parameters:
d2 - the second date to compare
Returns:
object

Ax.sql.Date.equals

boolean Ax.sql.Date.equals(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.sql.Date.format

string Ax.sql.Date.format(
	string format
)
Info:
Returns a string with the date in the specified format.
Parameters:
format - the format to use
Returns:
string

Ax.sql.Date.format

string Ax.sql.Date.format(
	string format,
	string language
)
Info:
Returns a string with the date in the specified format and localized for the given language.
Parameters:
format - the format to use
language - the local language
Returns:
string

Example
Copy
console.log(current.format("EEE, MMM d, ''yy", "es"));
         // lun., feb. 11, '19

Ax.sql.Date.formatDecimalInt

null Ax.sql.Date.formatDecimalInt(
	smallint arg0,
	object arg1,
	smallint arg2,
	smallint arg3
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
arg3 - 
Returns:
null

Ax.sql.Date.from

date Ax.sql.Date.from(
	object arg0
)
Parameters:
arg0 - 
Returns:
date

Ax.sql.Date.getDate

smallint Ax.sql.Date.getDate()
Returns:
smallint

Ax.sql.Date.getDateFullYear

smallint Ax.sql.Date.getDateFullYear(
	object date
)
Info:
Gets the year of the date.
Parameters:
date - the date to get the year from in javascript
Returns:
smallint

Ax.sql.Date.getDateFullYear

smallint Ax.sql.Date.getDateFullYear(
	object date
)
Info:
Gets the year of the date.
Parameters:
date - the date to get the year from as JSDate
Returns:
smallint

Ax.sql.Date.getDay

smallint Ax.sql.Date.getDay()
Returns:
smallint

Ax.sql.Date.getFullYear

smallint Ax.sql.Date.getFullYear()
Info:
Gets the year of the date.
Returns:
smallint

Ax.sql.Date.getHours

smallint Ax.sql.Date.getHours()
Returns:
smallint

Ax.sql.Date.getHours

smallint Ax.sql.Date.getHours()
Returns:
smallint

Ax.sql.Date.getMillisOf

long Ax.sql.Date.getMillisOf(
	date arg0
)
Parameters:
arg0 - 
Returns:
long

Ax.sql.Date.getMinutes

smallint Ax.sql.Date.getMinutes()
Returns:
smallint

Ax.sql.Date.getMinutes

smallint Ax.sql.Date.getMinutes()
Returns:
smallint

Ax.sql.Date.getMonth

smallint Ax.sql.Date.getMonth()
Returns:
smallint

Ax.sql.Date.getSeconds

smallint Ax.sql.Date.getSeconds()
Returns:
smallint

Ax.sql.Date.getSeconds

smallint Ax.sql.Date.getSeconds()
Returns:
smallint

Ax.sql.Date.getTime

long Ax.sql.Date.getTime()
Returns:
long

Ax.sql.Date.getTimeZone

string Ax.sql.Date.getTimeZone()
Info:
Returns the timezone date is represented in. By default system timezone but can be set by specific constructor or changed.
Returns:
string

Ax.sql.Date.getTimezoneOffset

smallint Ax.sql.Date.getTimezoneOffset()
Returns:
smallint

Ax.sql.Date.getYear

smallint Ax.sql.Date.getYear()
Info:
Gets the year of the date.
Returns:
smallint

Ax.sql.Date.getYear

smallint Ax.sql.Date.getYear()
Returns:
smallint

Ax.sql.Date.hashCode

smallint Ax.sql.Date.hashCode()
Returns:
smallint

Ax.sql.Date.hours

long Ax.sql.Date.hours(
	date d2
)
Info:
Returns the difference between the two given dates in hours.
Parameters:
d2 - the second date to compare
Returns:
long

Ax.sql.Date.internalCreateDate

object Ax.sql.Date.internalCreateDate(
	long timeInMillis
)
Info:
Create the date type required
Parameters:
timeInMillis - 
Returns:
object

Ax.sql.Date.internalGetDate

date Ax.sql.Date.internalGetDate()
Returns:
date

Ax.sql.Date.internalGetYear

smallint Ax.sql.Date.internalGetYear()
Returns:
smallint

Ax.sql.Date.isEngineAvailable

boolean Ax.sql.Date.isEngineAvailable()
Returns:
boolean

Ax.sql.Date.millis

long Ax.sql.Date.millis(
	date d2
)
Info:
Returns the difference between the two given dates in milliseconds.
Parameters:
d2 - the second date to compare
Returns:
long

Ax.sql.Date.minutes

long Ax.sql.Date.minutes(
	date d2
)
Info:
Returns the difference between the two given dates in minutes.
Parameters:
d2 - the second date to compare
Returns:
long

Ax.sql.Date.months

long Ax.sql.Date.months(
	object d2
)
Info:
Returns the difference between the two given dates in months.
Parameters:
d2 - the second date to compare
Returns:
long

Ax.sql.Date.parse

long Ax.sql.Date.parse(
	string arg0
)
Parameters:
arg0 - 
Returns:
long

Ax.sql.Date.seconds

long Ax.sql.Date.seconds(
	date d2
)
Info:
Returns the difference between the two given dates in seconds.
Parameters:
d2 - the second date to compare
Returns:
long

Ax.sql.Date.set

object Ax.sql.Date.set(
	smallint field,
	smallint value
)
Info:
Sets the given value to the defined field in the date, returning a new one. Fields are: ERA = 0, YEAR = 1, MONTH = 2, WEEK_OF_YEAR = 3, WEEK_OF_MONTH = 4, DAY_OF_MONTH = 5, DAY_OF_YEAR = 6, DAY_OF_WEEK = 7, DAY_OF_WEEK_IN_MONTH = 8, AM_PM = 9, HOUR = 10, HOUR_OF_DAY = 11, MINUTE = 12, SECOND = 13, MILLISECOND = 14, ZONE_OFFSET = 15, DST_OFFSET = 16, FIELD_COUNT = 17.
Parameters:
field - the field to set
value - the amount to add
Returns:
object

Ax.sql.Date.setConnection

object Ax.sql.Date.setConnection(
	object conn
)
Info:
Setups a database connection to format the date accordingly.
Parameters:
conn - the database connection
Returns:
object

Ax.sql.Date.setConnection

object Ax.sql.Date.setConnection(
	object conn
)
Info:
Setups a database connection to format the date accordingly.
Parameters:
conn - the database connection
Returns:
object

Ax.sql.Date.setDate

null Ax.sql.Date.setDate(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.setHours

null Ax.sql.Date.setHours(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.setHours

null Ax.sql.Date.setHours(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.setMinutes

null Ax.sql.Date.setMinutes(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.setMinutes

null Ax.sql.Date.setMinutes(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.setMonth

null Ax.sql.Date.setMonth(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.setSeconds

null Ax.sql.Date.setSeconds(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.setSeconds

null Ax.sql.Date.setSeconds(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.setTime

null Ax.sql.Date.setTime(
	long arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.setTime

null Ax.sql.Date.setTime(
	long arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.setTimeZone

object Ax.sql.Date.setTimeZone(
	string to
)
Info:
Sets the date timezone.
Parameters:
to - the timezone to set, like "Europe/London"
Returns:
object

Ax.sql.Date.setYear

null Ax.sql.Date.setYear(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.sql.Date.toCalendar

object Ax.sql.Date.toCalendar()
Info:
Converts the date to a Calendar object.
Returns:
object

Ax.sql.Date.toGMTString

string Ax.sql.Date.toGMTString()
Returns:
string

Ax.sql.Date.toHumanReadable

string Ax.sql.Date.toHumanReadable(
	object d
)
Info:
Returns the Duration in human readable format as a String with format like "2 d 20:14:56" or "20:14:56" when days are 0.
Parameters:
d - the duration
Returns:
string

Ax.sql.Date.toISOString

string Ax.sql.Date.toISOString()
Info:
Returns the date formated as ISO_8601 ("yyyy-MM-dd") without time part.
Returns:
string

Ax.sql.Date.toInstant

object Ax.sql.Date.toInstant()
Returns:
object

Ax.sql.Date.toInstant

object Ax.sql.Date.toInstant()
Returns:
object

Ax.sql.Date.toJavaSqlDate

date Ax.sql.Date.toJavaSqlDate()
Info:
To be used when a native java.sql.Date object is needed in Ax JavaScript code. For example, consider a report having a variable ('FECHA' = '2022-06-19') of type Date which is returned as a column ('fecha') in the main ResultSet this way: var rsOutput = new Ax.rs.Reader().memory(options =
Returns:
date

Ax.sql.Date.toLocalDate

object Ax.sql.Date.toLocalDate()
Returns:
object

Ax.sql.Date.toLocalDate

object Ax.sql.Date.toLocalDate()
Info:
Converts the date to the system's timezone.
Returns:
object

Ax.sql.Date.toLocaleString

string Ax.sql.Date.toLocaleString()
Returns:
string

Ax.sql.Date.toSQLQueryString

string Ax.sql.Date.toSQLQueryString()
Info:
Returns the date formated as the SQL agent requires. Informix: MDY(m,d,y)
Returns:
string

Ax.sql.Date.toString

string Ax.sql.Date.toString()
Info:
Converts the date to a human-readable string or database format.
Returns:
string

Example
Copy
var current = new Ax.sql.Date();
 	current.setConnection(Ax.db);
 	console.log(current);

Ax.sql.Date.toString

string Ax.sql.Date.toString()
Returns:
string

Ax.sql.Date.toString

string Ax.sql.Date.toString()
Returns:
string

Ax.sql.Date.valueOf

date Ax.sql.Date.valueOf(
	string arg0
)
Parameters:
arg0 - 
Returns:
date

Ax.sql.Date.valueOf

date Ax.sql.Date.valueOf(
	object arg0
)
Parameters:
arg0 - 
Returns:
date

Ax.sql.Date.weeks

long Ax.sql.Date.weeks(
	object d2
)
Info:
Returns the difference between the two given dates in weeks.
Parameters:
d2 - the second date to compare
Returns:
long

Ax.sql.Date.years

long Ax.sql.Date.years(
	object d2
)
Info:
Returns the difference between the two given dates in years.
Parameters:
d2 - the second date to compare
Returns:
long

3 ExecutorService

Class Ax.util.ExecutorService


A interface representing a executor service for running tasks in parallel in the Nashorn engine. This interface makes several assumptions about the tasks passed: - they should not depend on any external function or value - they should not be closures - they should accept one argument only, and output only one result - they should have no side-effects https://github.com/huehodaniel/nashorn-parallel-sandbox/tree/1b68d9aba5d2719230ad41fb29b784068d7a22bc/src/org/hueho/paralleljs In graal we're getting the following exception: Multi threaded access requested by thread Thread[ForkJoinPool-2-worker-3,5,main] but is not allowed for language(s) js. Graal concurrency rules: 1) In a polyglot application, an arbitrary number of JS runtimes can be created, but they should be used by one thread at a time. 2) Concurrent access to Java objects is allowed: any Java object can be accessed by any Java or JavaScript thread, concurrently. 3) Concurrent access to JavaScript objects is not allowed: any JavaScript object cannot be accessed by more than one thread at a time. https://medium.com/graalvm/multi-threaded-java-javascript-language-interoperability-in-graalvm-2f19c1f9c37b

Constructor Summary

Method
Description
Creates a new Executor Service.
JSExecutorService(int parallelism)
Creates a new Executor Service.

Method Summary

Modifier and Type
Method
Description
int 
Gets the parallelism level.
List 
invokeAll(Object task,Object[] args)
Runs a javascript function in parallel, with the given arguments.
List 
invokeAll(Object task, List<Object> args)
Runs a javascript function in parallel, with the given arguments.
List 
Runs a javascript function in parallel, with the given arguments.
List 
invokeAndGet(Object task, Collection collection)
Runs a javascript function in parallel, with the given arguments.
List 
invokeAndGet(org.graalvm.polyglot.Value task,Object[] args)
Runs a javascript function in parallel, with the given arguments.
submit(Object task, Object argument)
Submits the given function for parallel execution, with the given argument.
submit(org.graalvm.polyglot.Value task,Object argument)
Submits the given function for parallel execution, with the given argument.

Constructor Detail

Ax.util.ExecutorService.JSExecutorService

Ax.util.ExecutorService.JSExecutorService()
Info:
Creates a new Executor Service.

Ax.util.ExecutorService.JSExecutorService

Ax.util.ExecutorService.JSExecutorService(
	smallint parallelism
						)
Info:
Creates a new Executor Service.
Parameters:
parallelism - the desired parallelism level.

Method Detail

Ax.util.ExecutorService.getParallelism

smallint Ax.util.ExecutorService.getParallelism()
Info:
Gets the parallelism level.
Returns:
smallint

Ax.util.ExecutorService.invokeAll

array Ax.util.ExecutorService.invokeAll(
	object task,
	object[] args
)
Info:
Runs a javascript function in parallel, with the given arguments.
Parameters:
task - the js function to execute
args - an array of parameters to be used for each execution
Returns:
array

Ax.util.ExecutorService.invokeAll

array Ax.util.ExecutorService.invokeAll(
	object task,
	array args
)
Info:
Runs a javascript function in parallel, with the given arguments.
Parameters:
task - the js function to execute
args - a list of parameters to be used for each execution
Returns:
array

Ax.util.ExecutorService.invokeAndGet

array Ax.util.ExecutorService.invokeAndGet(
	object task,
	object[] args
)
Info:
Runs a javascript function in parallel, with the given arguments.
Parameters:
task - the js function to execute
args - an array with the parameters to use for each execution
Returns:
array

Ax.util.ExecutorService.invokeAndGet

array Ax.util.ExecutorService.invokeAndGet(
	object task,
	object collection
)
Info:
Runs a javascript function in parallel, with the given arguments.
Parameters:
task - the js function to execute
collection - a collection with the parameters to use for each execution
Returns:
array

Ax.util.ExecutorService.invokeAndGet

array Ax.util.ExecutorService.invokeAndGet(
	object task,
	object[] args
)
Info:
Runs a javascript function in parallel, with the given arguments.
Parameters:
task - the js function to execute
args - an array with the parameters to use for each execution
Returns:
array

Ax.util.ExecutorService.submit

object Ax.util.ExecutorService.submit(
	object task,
	object argument
)
Info:
Submits the given function for parallel execution, with the given argument.
Parameters:
task - the js function to execute
argument - the function argument
Returns:
object

Ax.util.ExecutorService.submit

object Ax.util.ExecutorService.submit(
	object task,
	object argument
)
Info:
Submits the given function for parallel execution, with the given argument.
Parameters:
task - the function to execute
argument - the function argument
Returns:
object

4 Error

Class Ax.util.Error


Error utils class.

Method Summary

Modifier and Type
Method
Description
static Ax.java.lang.Integer 
static Ax.java.lang.Integer 
Retrieves the vendor-specific exception code if the exception is of type SQLException, otherwise returns null
static Ax.text.String 
static Ax.java.lang.Integer 
static Ax.text.String 
getMessage(Object error)
Extracts the error message from a native JS object.
static Ax.text.String 
Extracts the error message from an instance of Throwable object.
static Ax.text.String 
Retrieves the SQLState code if the exception is of type SQLException, otherwise returns null
static Ax.text.String 
Extracts the stack trace from a native JS object.
static Ax.text.String 
Extracts the stack trace from an instance of Throwable object.
static boolean 

Method Detail

Ax.util.Error.getColumnNumber

static object Ax.util.Error.getColumnNumber(
	object o
)
Parameters:
o - 
Returns:
object

Ax.util.Error.getErrorCode

static object Ax.util.Error.getErrorCode(
	object o
)
Info:
Retrieves the vendor-specific exception code if the exception is of type SQLException, otherwise returns null
Parameters:
o - 
Returns:
object

Ax.util.Error.getFileName

static string Ax.util.Error.getFileName(
	object o
)
Parameters:
o - 
Returns:
string

Ax.util.Error.getLineNumber

static object Ax.util.Error.getLineNumber(
	object o
)
Parameters:
o - 
Returns:
object

Ax.util.Error.getMessage

static string Ax.util.Error.getMessage(
	object error
)
Info:
Extracts the error message from a native JS object.
Parameters:
error - the object to extract the message from
Returns:
string

Example
Copy
try {
 	   throw new Ax.lang.Exception("Something wrong happened!");
 } catch(e) {
 	   const message  = Ax.util.Error.getMessage(e);
 	   console.log(message);
 }

Ax.util.Error.getMessage

static string Ax.util.Error.getMessage(
	object error
)
Info:
Extracts the error message from an instance of Throwable object.
Parameters:
error - the throwable to extract the error message from
Returns:
string

Ax.util.Error.getSQLState

static string Ax.util.Error.getSQLState(
	object o
)
Info:
Retrieves the SQLState code if the exception is of type SQLException, otherwise returns null
Parameters:
o - 
Returns:
string

Ax.util.Error.getStackTrace

static string Ax.util.Error.getStackTrace(
	object error
)
Info:
Extracts the stack trace from a native JS object.
Parameters:
error - the object to extract the stack trace form
Returns:
string

Example
Copy
try {
 		   ...
 		} catch(e) {
 		 	const stack  = Ax.util.Error.getStackTrace(e);
 		}

Ax.util.Error.getStackTrace

static string Ax.util.Error.getStackTrace(
	object error
)
Info:
Extracts the stack trace from an instance of Throwable object.
Parameters:
error - the throwable to extract the stack trace from
Returns:
string

Ax.util.Error.isSQL

static boolean Ax.util.Error.isSQL(
	object o
)
Parameters:
o - 
Returns:
boolean

5 List

Class Ax.util.List


Class to create a java ArrayList.

Constructor Summary

Method
Description

Method Summary

Modifier and Type
Method
Description
boolean 
add(E arg0)
void 
add(int arg0,E arg1)
boolean 
add(E arg0)
void 
add(int arg0,E arg1)
boolean 
add(E arg0)
boolean 
boolean 
addAll(int arg0, Collection arg1)
boolean 
addAll(int arg0,Collection arg1)
boolean 
boolean 
batchRemove(Collection arg0,boolean arg1,int arg2,int arg3)
void 
void 
clear()
void 
clear()
void 
clear()
clone()
boolean 
contains(Object arg0)
boolean 
contains(Object arg0)
boolean 
elementAt(Object[] arg0, int arg1)
elementData(int arg0)
void 
ensureCapacity(int arg0)
boolean 
equals(Object arg0)
boolean 
equals(Object arg0)
boolean 
equalsRange(List arg0,int arg1,int arg2)
void 
forEach(Consumer arg0)
get(int arg0)
int 
int 
int 
hashCodeRange(int arg0, int arg1)
int 
indexOf(Object arg0)
int 
indexOf(Object arg0)
int 
indexOfRange(Object arg0,int arg1,int arg2)
boolean 
boolean 
Ax.text.String 
join(List list, Ax.text.String delimiter)
join the elements of the list with the given separator.
int 
int 
int 
lastIndexOfRange(Object arg0,int arg1,int arg2)
listIterator(int arg0)
listIterator(int arg0)
List 
of(Object[] args)
Creates a List with the content passed as arguments.
remove(int arg0)
boolean 
remove(Object arg0)
remove(int arg0)
boolean 
remove(Object arg0)
boolean 
boolean 
boolean 
boolean 
removeIf(Predicate arg0, int arg1, int arg2)
void 
boolean 
boolean 
set(int arg0, E arg1)
set(int arg0,E arg1)
int 
size()
void 
sort(Comparator arg0)
List 
subList(int arg0,int arg1)
List 
subList(int arg0, int arg1)
void 
subListRangeCheck(int arg0,int arg1,int arg2)
T[] 
toArray(T[] arg0)
T[] 
toArray(T[] arg0)
Ax.text.String 
void 

Constructor Detail

Ax.util.List.JSArrayList

Ax.util.List.JSArrayList()

Method Detail

Ax.util.List.add

boolean Ax.util.List.add(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.add

null Ax.util.List.add(
	smallint arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
null

Ax.util.List.add

boolean Ax.util.List.add(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.add

null Ax.util.List.add(
	smallint arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
null

Ax.util.List.add

boolean Ax.util.List.add(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.addAll

boolean Ax.util.List.addAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.addAll

boolean Ax.util.List.addAll(
	smallint arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
boolean

Ax.util.List.addAll

boolean Ax.util.List.addAll(
	smallint arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
boolean

Ax.util.List.addAll

boolean Ax.util.List.addAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.batchRemove

boolean Ax.util.List.batchRemove(
	object arg0,
	boolean arg1,
	smallint arg2,
	smallint arg3
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
arg3 - 
Returns:
boolean

Ax.util.List.checkInvariants

null Ax.util.List.checkInvariants()
Returns:
null

Ax.util.List.clear

null Ax.util.List.clear()
Returns:
null

Ax.util.List.clear

null Ax.util.List.clear()
Returns:
null

Ax.util.List.clear

null Ax.util.List.clear()
Returns:
null

Ax.util.List.clone

object Ax.util.List.clone()
Returns:
object

Ax.util.List.contains

boolean Ax.util.List.contains(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.contains

boolean Ax.util.List.contains(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.containsAll

boolean Ax.util.List.containsAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.elementAt

object Ax.util.List.elementAt(
	object[] arg0,
	smallint arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.List.elementData

object Ax.util.List.elementData(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.List.ensureCapacity

null Ax.util.List.ensureCapacity(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.List.equals

boolean Ax.util.List.equals(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.equals

boolean Ax.util.List.equals(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.equalsRange

boolean Ax.util.List.equalsRange(
	array arg0,
	smallint arg1,
	smallint arg2
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
Returns:
boolean

Ax.util.List.forEach

null Ax.util.List.forEach(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.List.get

object Ax.util.List.get(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.List.hashCode

smallint Ax.util.List.hashCode()
Returns:
smallint

Ax.util.List.hashCode

smallint Ax.util.List.hashCode()
Returns:
smallint

Ax.util.List.hashCodeRange

smallint Ax.util.List.hashCodeRange(
	smallint arg0,
	smallint arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
smallint

Ax.util.List.indexOf

smallint Ax.util.List.indexOf(
	object arg0
)
Parameters:
arg0 - 
Returns:
smallint

Ax.util.List.indexOf

smallint Ax.util.List.indexOf(
	object arg0
)
Parameters:
arg0 - 
Returns:
smallint

Ax.util.List.indexOfRange

smallint Ax.util.List.indexOfRange(
	object arg0,
	smallint arg1,
	smallint arg2
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
Returns:
smallint

Ax.util.List.isEmpty

boolean Ax.util.List.isEmpty()
Returns:
boolean

Ax.util.List.isEmpty

boolean Ax.util.List.isEmpty()
Returns:
boolean

Ax.util.List.iterator

object Ax.util.List.iterator()
Returns:
object

Ax.util.List.iterator

object Ax.util.List.iterator()
Returns:
object

Ax.util.List.join

string Ax.util.List.join(
	array list,
	string delimiter
)
Info:
join the elements of the list with the given separator.
Parameters:
list - 
delimiter - 
Returns:
string

Example
Copy
var list = Ax.util.List.join("A", 1, 1.1, new Ax.sql.Date());
     // ["A", 1, 1.1, {}]

Ax.util.List.lastIndexOf

smallint Ax.util.List.lastIndexOf(
	object arg0
)
Parameters:
arg0 - 
Returns:
smallint

Ax.util.List.lastIndexOf

smallint Ax.util.List.lastIndexOf(
	object arg0
)
Parameters:
arg0 - 
Returns:
smallint

Ax.util.List.lastIndexOfRange

smallint Ax.util.List.lastIndexOfRange(
	object arg0,
	smallint arg1,
	smallint arg2
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
Returns:
smallint

Ax.util.List.listIterator

object Ax.util.List.listIterator(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.List.listIterator

object Ax.util.List.listIterator()
Returns:
object

Ax.util.List.listIterator

object Ax.util.List.listIterator()
Returns:
object

Ax.util.List.listIterator

object Ax.util.List.listIterator(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.List.of

array Ax.util.List.of(
	object[] args
)
Info:
Creates a List with the content passed as arguments.
Parameters:
args - the list content
Returns:
array

Example
Copy
var list = Ax.util.List.of("A", 1, 1.1, new Ax.sql.Date());
     // ["A", 1, 1.1, {}]

Ax.util.List.remove

object Ax.util.List.remove(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.List.remove

boolean Ax.util.List.remove(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.remove

object Ax.util.List.remove(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.List.remove

boolean Ax.util.List.remove(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.removeAll

boolean Ax.util.List.removeAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.removeAll

boolean Ax.util.List.removeAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.removeIf

boolean Ax.util.List.removeIf(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.removeIf

boolean Ax.util.List.removeIf(
	object arg0,
	smallint arg1,
	smallint arg2
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
Returns:
boolean

Ax.util.List.replaceAll

null Ax.util.List.replaceAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.List.retainAll

boolean Ax.util.List.retainAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.retainAll

boolean Ax.util.List.retainAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.List.set

object Ax.util.List.set(
	smallint arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.List.set

object Ax.util.List.set(
	smallint arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.List.size

smallint Ax.util.List.size()
Returns:
smallint

Ax.util.List.sort

null Ax.util.List.sort(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.List.spliterator

object Ax.util.List.spliterator()
Returns:
object

Ax.util.List.subList

array Ax.util.List.subList(
	smallint arg0,
	smallint arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
array

Ax.util.List.subList

array Ax.util.List.subList(
	smallint arg0,
	smallint arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
array

Ax.util.List.subListRangeCheck

null Ax.util.List.subListRangeCheck(
	smallint arg0,
	smallint arg1,
	smallint arg2
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
Returns:
null

Ax.util.List.toArray

object[] Ax.util.List.toArray()
Returns:
object[]

Ax.util.List.toArray

object Ax.util.List.toArray(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.List.toArray

object[] Ax.util.List.toArray()
Returns:
object[]

Ax.util.List.toArray

object Ax.util.List.toArray(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.List.toString

string Ax.util.List.toString()
Returns:
string

Ax.util.List.trimToSize

null Ax.util.List.trimToSize()
Returns:
null

6 Map

Class Ax.util.Map


Constructor Summary

Method
Description

Method Summary

Modifier and Type
Method
Description
void 
afterNodeAccess(Node<KV> arg0)
void 
afterNodeInsertion(boolean arg0)
void 
afterNodeRemoval(Node<KV> arg0)
int 
void 
clear()
void 
clear()
clone()
int 
compareComparables(Class arg0, Object arg1, Object arg2)
compute(K arg0,BiFunction arg1)
computeIfAbsent(K arg0, Function arg1)
computeIfPresent(K arg0,BiFunction arg1)
boolean 
boolean 
boolean 
boolean 
Set 
boolean 
equals(Object arg0)
Map 
filter(Map map, Ax.text.String prefix)
Gets a map with all keys starting with the specific prefix.
void 
get(Object arg0)
get(Object arg0)
Node 
getNode(int arg0, Object arg1)
getOrDefault(Object arg0,V arg1)
int 
hash(Object arg0)
int 
void 
boolean 
boolean 
Set 
keySet()
Set 
keySet()
T[] 
keysToArray(T[] arg0)
float 
merge(K arg0,V arg1,BiFunction arg2)
Node 
newNode(int arg0, K arg1, V arg2, Node<KV> arg3)
newTreeNode(int arg0,K arg1,V arg2,Node<KV> arg3)
Map 
of(Object[] args)
Creates a java Map with the given arguments as content.
T[] 
prepareArray(T[] arg0)
put(K arg0, V arg1)
put(K arg0,V arg1)
void 
putAll(Map arg0)
void 
putAll(Map arg0)
putIfAbsent(K arg0, V arg1)
void 
putMapEntries(Map arg0,boolean arg1)
putVal(int arg0, K arg1, V arg2, boolean arg3, boolean arg4)
void 
remove(Object arg0)
boolean 
remove(Object arg0,Object arg1)
remove(Object arg0)
Node 
removeNode(int arg0,Object arg1,Object arg2,boolean arg3,boolean arg4)
boolean 
replace(K arg0, V arg1, V arg2)
replace(K arg0,V arg1)
void 
Node 
replacementNode(Node<KV> arg0,Node<KV> arg1)
replacementTreeNode(Node<KV> arg0, Node<KV> arg1)
Node 
resize()
int 
size()
int 
size()
int 
tableSizeFor(int arg0)
Ax.text.String 
void 
treeifyBin(Node arg0, int arg1)
values()
values()
T[] 
valuesToArray(T[] arg0)

Constructor Detail

Ax.util.Map.JSHashMap

Ax.util.Map.JSHashMap()

Method Detail

Ax.util.Map.afterNodeAccess

null Ax.util.Map.afterNodeAccess(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.Map.afterNodeInsertion

null Ax.util.Map.afterNodeInsertion(
	boolean arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.Map.afterNodeRemoval

null Ax.util.Map.afterNodeRemoval(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.Map.capacity

smallint Ax.util.Map.capacity()
Returns:
smallint

Ax.util.Map.clear

null Ax.util.Map.clear()
Returns:
null

Ax.util.Map.clear

null Ax.util.Map.clear()
Returns:
null

Ax.util.Map.clone

object Ax.util.Map.clone()
Returns:
object

Ax.util.Map.comparableClassFor

object Ax.util.Map.comparableClassFor(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.Map.compareComparables

smallint Ax.util.Map.compareComparables(
	object arg0,
	object arg1,
	object arg2
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
Returns:
smallint

Ax.util.Map.compute

object Ax.util.Map.compute(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.computeIfAbsent

object Ax.util.Map.computeIfAbsent(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.computeIfPresent

object Ax.util.Map.computeIfPresent(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.containsKey

boolean Ax.util.Map.containsKey(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.Map.containsKey

boolean Ax.util.Map.containsKey(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.Map.containsValue

boolean Ax.util.Map.containsValue(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.Map.containsValue

boolean Ax.util.Map.containsValue(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.Map.entrySet

object Ax.util.Map.entrySet()
Returns:
object

Ax.util.Map.equals

boolean Ax.util.Map.equals(
	object arg0
)
Parameters:
arg0 - 
Returns:
boolean

Ax.util.Map.filter

object Ax.util.Map.filter(
	object map,
	string prefix
)
Info:
Gets a map with all keys starting with the specific prefix.
Parameters:
map - the source map
prefix - the filtering prefix
Returns:
object

Ax.util.Map.forEach

null Ax.util.Map.forEach(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.Map.get

object Ax.util.Map.get(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.Map.get

object Ax.util.Map.get(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.Map.getNode

object Ax.util.Map.getNode(
	smallint arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.getOrDefault

object Ax.util.Map.getOrDefault(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.hash

smallint Ax.util.Map.hash(
	object arg0
)
Parameters:
arg0 - 
Returns:
smallint

Ax.util.Map.hashCode

smallint Ax.util.Map.hashCode()
Returns:
smallint

Ax.util.Map.internalWriteEntries

null Ax.util.Map.internalWriteEntries(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.Map.isEmpty

boolean Ax.util.Map.isEmpty()
Returns:
boolean

Ax.util.Map.isEmpty

boolean Ax.util.Map.isEmpty()
Returns:
boolean

Ax.util.Map.keySet

object Ax.util.Map.keySet()
Returns:
object

Ax.util.Map.keySet

object Ax.util.Map.keySet()
Returns:
object

Ax.util.Map.keysToArray

object Ax.util.Map.keysToArray(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.Map.loadFactor

object Ax.util.Map.loadFactor()
Returns:
object

Ax.util.Map.merge

object Ax.util.Map.merge(
	object arg0,
	object arg1,
	object arg2
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
Returns:
object

Ax.util.Map.newNode

object Ax.util.Map.newNode(
	smallint arg0,
	object arg1,
	object arg2,
	object arg3
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
arg3 - 
Returns:
object

Ax.util.Map.newTreeNode

object Ax.util.Map.newTreeNode(
	smallint arg0,
	object arg1,
	object arg2,
	object arg3
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
arg3 - 
Returns:
object

Ax.util.Map.of

object Ax.util.Map.of(
	object[] args
)
Info:
Creates a java Map with the given arguments as content. The given arguments must be even, so for each pair the first argument is the key and the second is the value.
Parameters:
args - the map content
Returns:
object

Example
Copy
var list = Ax.util.Map.of("A", 1, "B", 2);

 // { "A": 1, "B": 2 }

Ax.util.Map.prepareArray

object Ax.util.Map.prepareArray(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.Map.put

object Ax.util.Map.put(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.put

object Ax.util.Map.put(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.putAll

null Ax.util.Map.putAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.Map.putAll

null Ax.util.Map.putAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.Map.putIfAbsent

object Ax.util.Map.putIfAbsent(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.putMapEntries

null Ax.util.Map.putMapEntries(
	object arg0,
	boolean arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
null

Ax.util.Map.putVal

object Ax.util.Map.putVal(
	smallint arg0,
	object arg1,
	object arg2,
	boolean arg3,
	boolean arg4
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
arg3 - 
arg4 - 
Returns:
object

Ax.util.Map.reinitialize

null Ax.util.Map.reinitialize()
Returns:
null

Ax.util.Map.remove

object Ax.util.Map.remove(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.Map.remove

boolean Ax.util.Map.remove(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
boolean

Ax.util.Map.remove

object Ax.util.Map.remove(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.Map.removeNode

object Ax.util.Map.removeNode(
	smallint arg0,
	object arg1,
	object arg2,
	boolean arg3,
	boolean arg4
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
arg3 - 
arg4 - 
Returns:
object

Ax.util.Map.replace

boolean Ax.util.Map.replace(
	object arg0,
	object arg1,
	object arg2
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
Returns:
boolean

Ax.util.Map.replace

object Ax.util.Map.replace(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.replaceAll

null Ax.util.Map.replaceAll(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.Map.replacementNode

object Ax.util.Map.replacementNode(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.replacementTreeNode

object Ax.util.Map.replacementTreeNode(
	object arg0,
	object arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.Map.resize

object Ax.util.Map.resize()
Returns:
object

Ax.util.Map.size

smallint Ax.util.Map.size()
Returns:
smallint

Ax.util.Map.size

smallint Ax.util.Map.size()
Returns:
smallint

Ax.util.Map.tableSizeFor

smallint Ax.util.Map.tableSizeFor(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
smallint

Ax.util.Map.toString

string Ax.util.Map.toString()
Returns:
string

Ax.util.Map.treeifyBin

null Ax.util.Map.treeifyBin(
	object arg0,
	smallint arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
null

Ax.util.Map.values

object Ax.util.Map.values()
Returns:
object

Ax.util.Map.values

object Ax.util.Map.values()
Returns:
object

Ax.util.Map.valuesToArray

object Ax.util.Map.valuesToArray(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

7 Base64

Class Ax.util.Base64


A Base64 encoder/decoder

Constructor Summary

Method
Description

Method Summary

Modifier and Type
Method
Description
byte[] 
Decodes the given encoded data with URL and Filename safe base64.
byte[] 
URLdecode(Ax.text.String text)
Decodes the given encoded data with URL and Filename safe base64.
Ax.text.String 
URLencode(byte[] data)
Encodes the given data with URL and Filename safe base64.
byte[] 
decode(Ax.text.String text)
Decodes the given encoded data with basic base64.
byte[] 
decode(byte[] data)
Decodes the given encoded data with basic base64.
byte[] 
Decodes the given encoded data with basic base64.
Ax.text.String 
encode(byte[] data)
Encodes the given data with basic base64.
Ax.text.String 
encode(Ax.text.String data)
Encodes the given data with basic base64.
byte[] 
mimeDecode(Ax.text.String text)
Decodes the given encoded data with MIME base64.
byte[] 
mimeDecode(byte[] data)
Decodes the given encoded data with MIME base64.
byte[] 
Decodes the given encoded data with MIME base64.
Ax.text.String 
mimeEncode(byte[] data)
Encodes the given data with MIME base64.

Constructor Detail

Ax.util.Base64.JSBase64

Ax.util.Base64.JSBase64()

Method Detail

Ax.util.Base64.URLdecode

byte[] Ax.util.Base64.URLdecode(
	object in
)
Info:
Decodes the given encoded data with URL and Filename safe base64.
Parameters:
in - the InputStream to get the data from
Returns:
byte[]

Ax.util.Base64.URLdecode

byte[] Ax.util.Base64.URLdecode(
	string text
)
Info:
Decodes the given encoded data with URL and Filename safe base64.
Parameters:
text - the text with the data to decode
Returns:
byte[]

Ax.util.Base64.URLencode

string Ax.util.Base64.URLencode(
	byte[] data
)
Info:
Encodes the given data with URL and Filename safe base64.
Parameters:
data - the data to encode
Returns:
string

Ax.util.Base64.decode

byte[] Ax.util.Base64.decode(
	string text
)
Info:
Decodes the given encoded data with basic base64.
Parameters:
text - the text with the data to decode
Returns:
byte[]

Example
Copy
Ax.util.Base64.decode("SGVsbG8gd29ybGQ=")

Ax.util.Base64.decode

byte[] Ax.util.Base64.decode(
	byte[] data
)
Info:
Decodes the given encoded data with basic base64.
Parameters:
data - the data to decode
Returns:
byte[]

Ax.util.Base64.decode

byte[] Ax.util.Base64.decode(
	object in
)
Info:
Decodes the given encoded data with basic base64.
Parameters:
in - the InputStream to get the data from
Returns:
byte[]

Ax.util.Base64.encode

string Ax.util.Base64.encode(
	byte[] data
)
Info:
Encodes the given data with basic base64.
Parameters:
data - the data to encode
Returns:
string

Example
Copy
Ax.util.Base64.encode("Hello world".getBytes());

Ax.util.Base64.encode

string Ax.util.Base64.encode(
	string data
)
Info:
Encodes the given data with basic base64.
Parameters:
data - the data to encode
Returns:
string

Ax.util.Base64.mimeDecode

byte[] Ax.util.Base64.mimeDecode(
	string text
)
Info:
Decodes the given encoded data with MIME base64.
Parameters:
text - the text with the data to decode
Returns:
byte[]

Ax.util.Base64.mimeDecode

byte[] Ax.util.Base64.mimeDecode(
	byte[] data
)
Info:
Decodes the given encoded data with MIME base64.
Parameters:
data - the data to decode
Returns:
byte[]

Ax.util.Base64.mimeDecode

byte[] Ax.util.Base64.mimeDecode(
	object in
)
Info:
Decodes the given encoded data with MIME base64.
Parameters:
in - the InputStream to get the data from
Returns:
byte[]

Ax.util.Base64.mimeEncode

string Ax.util.Base64.mimeEncode(
	byte[] data
)
Info:
Encodes the given data with MIME base64.
Parameters:
data - the data to encode
Returns:
string

8 Preferences

Class Ax.util.Preferences


A node in a hierarchical collection of preference data. This class allows applications to store and retrieve user and system preference and configuration data. This data is stored persistently in an implementation-dependent backing store. Typical implementations include flat files, OS-specific registries, directory servers and SQL databases. The user of this class needn't be concerned with details of the backing store.

Constructor Summary

Method
Description
JSPreferences(Ax.text.String name)
Creates a new preferences node with the given name, or retrieves it if it already exists.

Method Summary

Modifier and Type
Method
Description
boolean 
getBoolean(Ax.text.String key, boolean def)
Returns the boolean value represented by the string associated with the specified key in this preference node.
double 
getDouble(Ax.text.String key,double def)
Returns the double value represented by the string associated with the specified key in this preference node.
int 
getInt(Ax.text.String key, int def)
Returns the int value represented by the string associated with the specified key in this preference node.
Ax.text.String 
getString(Ax.text.String key,Ax.text.String def)
Returns the string value represented by the string associated with the specified key in this preference node.
void 
setBoolean(Ax.text.String key, boolean def)
Associates a string representing the specified boolean value with the specified key in this preference node.
void 
setDouble(Ax.text.String key,double def)
Associates a string representing the specified double value with the specified key in this preference node.
void 
setInt(Ax.text.String key, int def)
Associates a string representing the specified int value with the specified key in this preference node.
void 
setString(Ax.text.String key,Ax.text.String def)
Associates a string with the specified key in this preference node.

Constructor Detail

Ax.util.Preferences.JSPreferences

Ax.util.Preferences.JSPreferences(
	string name
						)
Info:
Creates a new preferences node with the given name, or retrieves it if it already exists.
Parameters:
name - 

Example
Copy
let prefs = new Ax.utils.Preferences("newNode");

Method Detail

Ax.util.Preferences.getBoolean

boolean Ax.util.Preferences.getBoolean(
	string key,
	boolean def
)
Info:
Returns the boolean value represented by the string associated with the specified key in this preference node.
Parameters:
key - key whose associated value is to be returned as a boolean
def - the value to be returned in the event that this preference node has no value associated with key or the associated value cannot be interpreted as a boolean, or the backing store is inaccessible
Returns:
boolean

Ax.util.Preferences.getDouble

double Ax.util.Preferences.getDouble(
	string key,
	double def
)
Info:
Returns the double value represented by the string associated with the specified key in this preference node.
Parameters:
key - key whose associated value is to be returned as a double
def - the value to be returned in the event that this preference node has no value associated with key or the associated value cannot be interpreted as a double, or the backing store is inaccessible
Returns:
double

Ax.util.Preferences.getInt

smallint Ax.util.Preferences.getInt(
	string key,
	smallint def
)
Info:
Returns the int value represented by the string associated with the specified key in this preference node.
Parameters:
key - key whose associated value is to be returned as an int.
def - the value to be returned in the event that this preference node has no value associated with key or the associated value cannot be interpreted as an int, or the backing store is inaccessible.
Returns:
smallint

Ax.util.Preferences.getString

string Ax.util.Preferences.getString(
	string key,
	string def
)
Info:
Returns the string value represented by the string associated with the specified key in this preference node.
Parameters:
key - key whose associated value is to be returned as a string
def - the value to be returned in the event that this preference node has no value associated with key or the associated value cannot be interpreted as a string, or the backing store is inaccessible
Returns:
string

Ax.util.Preferences.setBoolean

null Ax.util.Preferences.setBoolean(
	string key,
	boolean def
)
Info:
Associates a string representing the specified boolean value with the specified key in this preference node.
Parameters:
key - key with which the value is to be associated
def - value to be associated with the key
Returns:
null

Ax.util.Preferences.setDouble

null Ax.util.Preferences.setDouble(
	string key,
	double def
)
Info:
Associates a string representing the specified double value with the specified key in this preference node.
Parameters:
key - key with which the value is to be associated
def - value to be associated with the key
Returns:
null

Ax.util.Preferences.setInt

null Ax.util.Preferences.setInt(
	string key,
	smallint def
)
Info:
Associates a string representing the specified int value with the specified key in this preference node.
Parameters:
key - key with which the value is to be associated
def - value to be associated with the key
Returns:
null

Ax.util.Preferences.setString

null Ax.util.Preferences.setString(
	string key,
	string def
)
Info:
Associates a string with the specified key in this preference node.
Parameters:
key - key with which the value is to be associated
def - value to be associated with the key
Returns:
null

9 Hex

Class Ax.util.Hex


Hexadecimal conversor.

Constructor Summary

Method
Description
JSHex()

Method Summary

Modifier and Type
Method
Description
byte[] 
decode(Ax.text.String text)
Decodes the text content in hexadecimal.
Ax.text.String 
encode(byte[] data)
Encodes the data to hexadecimal.

Constructor Detail

Ax.util.Hex.JSHex

Ax.util.Hex.JSHex()

Method Detail

Ax.util.Hex.decode

byte[] Ax.util.Hex.decode(
	string text
)
Info:
Decodes the text content in hexadecimal.
Parameters:
text - the text with the hexadecimal value to decode
Returns:
byte[]

Example
Copy
var conversor = new Ax.util.Hex();
     	   console.log(conversor.encode("Hello world".getBytes()));

Ax.util.Hex.encode

string Ax.util.Hex.encode(
	byte[] data
)
Info:
Encodes the data to hexadecimal.
Parameters:
data - the data to encode
Returns:
string

Example
Copy
var conversor = new Ax.util.Hex();
     	       console.log(conversor.decode("48656c6c6f20776f726c64"));

10 UUID

Class Ax.util.UUID


Utility class to use Universally Unique Identifiers. Wrapper for java.util.UUID.

Constructor Summary

Method
Description
JSUUID()
Creates a new random UUID.
JSUUID(Ax.text.String s)

Method Summary

Modifier and Type
Method
Description
Ax.text.String 
Returns the UUID as a String.

Constructor Detail

Ax.util.UUID.JSUUID

Ax.util.UUID.JSUUID()
Info:
Creates a new random UUID.

Example
Copy
var uuid = new Ax.util.UUID();

Ax.util.UUID.JSUUID

Ax.util.UUID.JSUUID(
	string s
						)
Parameters:
s - 

Method Detail

Ax.util.UUID.toString

string Ax.util.UUID.toString()
Info:
Returns the UUID as a String.
Returns:
string

11 RegEx

Class Ax.util.RegEx


Regular expressions utility class.

Constructor Summary

Method
Description
JSRegEx(Ax.text.String regex)
Creates a new regular expression instance.

Method Summary

Modifier and Type
Method
Description
Ax.text.String 
parse(Ax.text.String input, Function<MatcherString> config)
Parses the given input with the processsing configuration function.

Constructor Detail

Ax.util.RegEx.JSRegEx

Ax.util.RegEx.JSRegEx(
	string regex
						)
Info:
Creates a new regular expression instance.
Parameters:
regex - the regular expression

Example
Copy
let regex = new Ax.util.RegEx("#\\w+-\\d+");

Method Detail

Ax.util.RegEx.parse

string Ax.util.RegEx.parse(
	string input,
	object config
)
Info:
Parses the given input with the processsing configuration function. config returns the formatted string to apply the input to.
Parameters:
input - the text to apply the regex to
config - the processing function, returns the text template to ad the imput to
Returns:
string

Example
Copy
var input = "First: #AA-1010, Second #AB-2020";
 		return new Ax.util.RegEx("#\\w+-\\d+").parse(input, (matcher, _) => {
 			var tag = matcher.group(0);
 			return Ax.lang.String.format("<a href='http://data/%s'>%s</a>", tag, tag).toString();
 		});

12 Formatter

Class Ax.util.locale.Formatter


This class exposes the ResultSet locale formatter to Javascript.

Constructor Summary

Method
Description
JSLocaleFormatter(Ax.text.String lang)
Creates a new locale formatter from a language code.
JSLocaleFormatter(Ax.text.String lang, Ax.text.String country)
Creates a new locale formatter from a language and country.
Creates a new locale formatter from the given Locale.

Method Summary

Modifier and Type
Method
Description
Ax.text.String 
__format(Object arg0, int arg1, int arg2)
Ax.text.String 
format(Object arg0)
Ax.text.String 
format(Object arg0, int arg1)
Ax.text.String 
format(Object arg0,int arg1,int arg2)
Ax.text.DecimalFormat 
char 
Ax.text.String 
Ax.text.String 
void 
main(String[] arg0)
setDateFormat(Ax.text.String arg0)
void 
setSQLDateFormat(Ax.text.String arg0)
setSQLTimeFormat(Ax.text.String arg0)
setSQLTimestampFormat(Ax.text.String arg0)
setScale(int arg0,int arg1)
setScale(int arg0)
setTimeFormat(Ax.text.String arg0)
setTimeZone(Ax.text.String arg0)
setTimestampFormat(Ax.text.String arg0)
Ax.text.String 
toString(Object arg0, int arg1, int arg2, Ax.text.String arg3)

Constructor Detail

Ax.util.locale.Formatter.JSLocaleFormatter

Ax.util.locale.Formatter.JSLocaleFormatter(
	string lang
						)
Info:
Creates a new locale formatter from a language code.
Parameters:
lang - the language to get the formatter

Example
Copy
var lf_es = new Ax.util.locale.Formatter("es");

Ax.util.locale.Formatter.JSLocaleFormatter

Ax.util.locale.Formatter.JSLocaleFormatter(
	string lang,
	string country
						)
Info:
Creates a new locale formatter from a language and country.
Parameters:
lang - the language to get the formatter
country - the country to get the formatter

Ax.util.locale.Formatter.JSLocaleFormatter

Ax.util.locale.Formatter.JSLocaleFormatter(
	object locale
						)
Info:
Creates a new locale formatter from the given Locale.
Parameters:
locale - the source Locale

Method Detail

Ax.util.locale.Formatter.__format

string Ax.util.locale.Formatter.__format(
	object arg0,
	smallint arg1,
	smallint arg2
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
Returns:
string

Ax.util.locale.Formatter.format

string Ax.util.locale.Formatter.format(
	object arg0
)
Parameters:
arg0 - 
Returns:
string

Ax.util.locale.Formatter.format

string Ax.util.locale.Formatter.format(
	object arg0,
	smallint arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
string

Ax.util.locale.Formatter.format

string Ax.util.locale.Formatter.format(
	object arg0,
	smallint arg1,
	smallint arg2
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
Returns:
string

Ax.util.locale.Formatter.getDateFormat

object Ax.util.locale.Formatter.getDateFormat()
Returns:
object

Ax.util.locale.Formatter.getDateFormatSymbols

object Ax.util.locale.Formatter.getDateFormatSymbols()
Returns:
object

Ax.util.locale.Formatter.getDecimalFormat

object Ax.util.locale.Formatter.getDecimalFormat()
Returns:
object

Ax.util.locale.Formatter.getDecimalFormatSymbols

object Ax.util.locale.Formatter.getDecimalFormatSymbols()
Returns:
object

Ax.util.locale.Formatter.getDecimalSeparatorChar

object Ax.util.locale.Formatter.getDecimalSeparatorChar()
Returns:
object

Ax.util.locale.Formatter.getLang

string Ax.util.locale.Formatter.getLang()
Returns:
string

Ax.util.locale.Formatter.getLocale

object Ax.util.locale.Formatter.getLocale()
Returns:
object

Ax.util.locale.Formatter.getName

string Ax.util.locale.Formatter.getName()
Returns:
string

Ax.util.locale.Formatter.getNumberFormat

object Ax.util.locale.Formatter.getNumberFormat()
Returns:
object

Ax.util.locale.Formatter.getTimeFormat

object Ax.util.locale.Formatter.getTimeFormat()
Returns:
object

Ax.util.locale.Formatter.getTimeZone

object Ax.util.locale.Formatter.getTimeZone()
Returns:
object

Ax.util.locale.Formatter.getTimestampFormat

object Ax.util.locale.Formatter.getTimestampFormat()
Returns:
object

Ax.util.locale.Formatter.main

null Ax.util.locale.Formatter.main(
	string[] arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.locale.Formatter.setDateFormat

object Ax.util.locale.Formatter.setDateFormat(
	string arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.setDateFormats

null Ax.util.locale.Formatter.setDateFormats(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.locale.Formatter.setDecimalFormatSymbols

object Ax.util.locale.Formatter.setDecimalFormatSymbols(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.setJDBCDriver

object Ax.util.locale.Formatter.setJDBCDriver(
	resultset arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.setJDBCDriver

object Ax.util.locale.Formatter.setJDBCDriver(
	object arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.setSQLDateFormat

object Ax.util.locale.Formatter.setSQLDateFormat(
	string arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.setSQLTimeFormat

object Ax.util.locale.Formatter.setSQLTimeFormat(
	string arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.setSQLTimestampFormat

object Ax.util.locale.Formatter.setSQLTimestampFormat(
	string arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.setScale

object Ax.util.locale.Formatter.setScale(
	smallint arg0,
	smallint arg1
)
Parameters:
arg0 - 
arg1 - 
Returns:
object

Ax.util.locale.Formatter.setScale

object Ax.util.locale.Formatter.setScale(
	smallint arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.setTimeFormat

object Ax.util.locale.Formatter.setTimeFormat(
	string arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.setTimeZone

object Ax.util.locale.Formatter.setTimeZone(
	string arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.setTimestampFormat

object Ax.util.locale.Formatter.setTimestampFormat(
	string arg0
)
Parameters:
arg0 - 
Returns:
object

Ax.util.locale.Formatter.toString

string Ax.util.locale.Formatter.toString(
	object arg0,
	smallint arg1,
	smallint arg2,
	string arg3
)
Parameters:
arg0 - 
arg1 - 
arg2 - 
arg3 - 
Returns:
string

13 JarArchive

Class Ax.util.jar.JarArchive


Class to create a Jar archive using JarOutputStream backed by memory (or File storage ... ?).

Constructor Summary

Method
Description
Creates a new JarArchive instance.
JSJarArchive(Ax.text.String name)
Creates a new JarArchive instance with the given name.
JSJarArchive(Ax.io.File file)
Creates a new JarArchive instance for the given file.
JSJarArchive(Ax.sql.Blob blob)
Creates a new JarArchive instance from the blob contents.
Creates a new JarArchive instance from the blob contents.

Method Summary

Modifier and Type
Method
Description
void 
add(Ax.text.String name,Object source)
Adds a file entry to the jar file.
void 
add(Ax.io.File source)
Adds a file entry to the jar file.
void 
add(File source)
Adds a file entry to the jar file.
Ax.text.String 
asJSON()
This is a vanilla JSON, not convertible back to ResultSet
void 
Compare two resultset withs a default delta
compare(IResultSetConvertible other,double delta)
cursor()
boolean 
Compare two resultset withs a default delta
boolean 
equals(IResultSetConvertible other, double delta)
boolean 
Returns an iterator over the jar archive entries.
stream()
Returns the jar archive as a Stream.
toBlob()
Converts the jar archive to a blob.
byte[] 
Converts the jar archive to a bytearray.
Ax.text.String 
toCSV()
Convert a ResultSet to CSV
void 
Convert a ResultSet to CSV using a provided configurator
byte[] 
Convert a ResultSet to Excel without consumer, returning directly it's bytes using default type (XLSX)
void 
Convert a ResultSet to CSV using a provided configurator
Ax.text.String 
toFOP()
Ax.text.String 
Convert the ResultSet to a FOP XML document
Ax.text.String 
toFOPTableBody(double width)
Ax.text.String 
toFOPTableBody(Consumer<FOPReportConfig> config,double width)
Convert the ResultSet to a FOP XML table body document so it can be integrated into another document
Ax.text.String 
toHTML()
Ax.text.String 
Convert the ResultSet to a HTML document
Returns an InputStream for the jar archive
Ax.text.String 
toJSON()
Convert a ResultSet to JSON that can be digested by aa JSON2ResultSet again into a SQLResultSetArray
Ax.text.String 
Convert a ResultSet to JSON
Ax.text.String 
Convert the ResultSet to a Javascript declaration (useful for coding)
byte[] 
toPDF()
byte[] 
Convert the ResultSet to a PDF document
byte[] 
toPDF(Ax.text.String fop)
Useful method for testing so we can produce a FOP and transform to PDF
Generates a ResultSet from the jar archive.
Perform a conversion to resultset
toRow()
toSQLCA(Object value)
Converts the object to SQLCA
Ax.text.String 
toText()
Ax.text.String 
Convert the ResultSet to a TEXT document
byte[] 
toXLS()
Convert a ResultSet to Excel (XLS)
byte[] 
toXLSX()
Convert a ResultSet to Excel (XLSX using streaming api)

Constructor Detail

Ax.util.jar.JarArchive.JSJarArchive

Ax.util.jar.JarArchive.JSJarArchive()
Info:
Creates a new JarArchive instance.

Example
Copy
var jar = new Ax.util.jar.JarArchive();

Ax.util.jar.JarArchive.JSJarArchive

Ax.util.jar.JarArchive.JSJarArchive(
	string name
						)
Info:
Creates a new JarArchive instance with the given name.
Parameters:
name - the jar name

Ax.util.jar.JarArchive.JSJarArchive

Ax.util.jar.JarArchive.JSJarArchive(
	file file
						)
Info:
Creates a new JarArchive instance for the given file.
Parameters:
file - the source file

Example
Copy
var jar = new Ax.util.jar.JarArchive(new Ax.io.File("/tmp/documents.jar"))

Ax.util.jar.JarArchive.JSJarArchive

Ax.util.jar.JarArchive.JSJarArchive(
	object blob
						)
Info:
Creates a new JarArchive instance from the blob contents.
Parameters:
blob - the source blob

Ax.util.jar.JarArchive.JSJarArchive

Ax.util.jar.JarArchive.JSJarArchive(
	object blob
						)
Info:
Creates a new JarArchive instance from the blob contents.
Parameters:
blob - the source blob

Method Detail

Ax.util.jar.JarArchive.__toResultSet

resultset Ax.util.jar.JarArchive.__toResultSet(
	object value
)
Parameters:
value - 
Returns:
resultset

Ax.util.jar.JarArchive.add

null Ax.util.jar.JarArchive.add(
	string name,
	object source
)
Info:
Adds a file entry to the jar file.
Parameters:
name - file name
source - file source code/text
Returns:
null

Ax.util.jar.JarArchive.add

null Ax.util.jar.JarArchive.add(
	file source
)
Info:
Adds a file entry to the jar file.
Parameters:
source - the source file
Returns:
null

Ax.util.jar.JarArchive.add

null Ax.util.jar.JarArchive.add(
	file source
)
Info:
Adds a file entry to the jar file.
Parameters:
source - the source file
Returns:
null

Ax.util.jar.JarArchive.asJSON

string Ax.util.jar.JarArchive.asJSON()
Info:
This is a vanilla JSON, not convertible back to ResultSet
Returns:
string

Ax.util.jar.JarArchive.asJSON

null Ax.util.jar.JarArchive.asJSON(
	object config
)
Parameters:
config - 
Returns:
null

Ax.util.jar.JarArchive.compare

object Ax.util.jar.JarArchive.compare(
	object other
)
Info:
Compare two resultset withs a default delta
Parameters:
other - 
Returns:
object

Ax.util.jar.JarArchive.compare

object Ax.util.jar.JarArchive.compare(
	object other,
	double delta
)
Parameters:
other - 
delta - 
Returns:
object

Ax.util.jar.JarArchive.cursor

object Ax.util.jar.JarArchive.cursor()
Returns:
object

Ax.util.jar.JarArchive.equals

boolean Ax.util.jar.JarArchive.equals(
	object other
)
Info:
Compare two resultset withs a default delta
Parameters:
other - 
Returns:
boolean

Ax.util.jar.JarArchive.equals

boolean Ax.util.jar.JarArchive.equals(
	object other,
	double delta
)
Parameters:
other - 
delta - 
Returns:
boolean

Ax.util.jar.JarArchive.isResultSet

boolean Ax.util.jar.JarArchive.isResultSet(
	object value
)
Parameters:
value - 
Returns:
boolean

Ax.util.jar.JarArchive.iterator

object Ax.util.jar.JarArchive.iterator()
Info:
Returns an iterator over the jar archive entries.
Returns:
object

Ax.util.jar.JarArchive.stream

object Ax.util.jar.JarArchive.stream()
Info:
Returns the jar archive as a Stream.
Returns:
object

Ax.util.jar.JarArchive.toBlob

object Ax.util.jar.JarArchive.toBlob()
Info:
Converts the jar archive to a blob.
Returns:
object

Ax.util.jar.JarArchive.toBytes

byte[] Ax.util.jar.JarArchive.toBytes()
Info:
Converts the jar archive to a bytearray.
Returns:
byte[]

Ax.util.jar.JarArchive.toCSV

string Ax.util.jar.JarArchive.toCSV()
Info:
Convert a ResultSet to CSV
Returns:
string

Ax.util.jar.JarArchive.toCSV

null Ax.util.jar.JarArchive.toCSV(
	object config
)
Info:
Convert a ResultSet to CSV using a provided configurator
Parameters:
config - 
Returns:
null

Ax.util.jar.JarArchive.toExcel

byte[] Ax.util.jar.JarArchive.toExcel()
Info:
Convert a ResultSet to Excel without consumer, returning directly it's bytes using default type (XLSX)
Returns:
byte[]

Ax.util.jar.JarArchive.toExcel

null Ax.util.jar.JarArchive.toExcel(
	object config
)
Info:
Convert a ResultSet to CSV using a provided configurator
Parameters:
config - 
Returns:
null

Ax.util.jar.JarArchive.toFOP

string Ax.util.jar.JarArchive.toFOP()
Returns:
string

Ax.util.jar.JarArchive.toFOP

string Ax.util.jar.JarArchive.toFOP(
	object config
)
Info:
Convert the ResultSet to a FOP XML document
Parameters:
config - 
Returns:
string

Ax.util.jar.JarArchive.toFOPTableBody

string Ax.util.jar.JarArchive.toFOPTableBody(
	double width
)
Parameters:
width - 
Returns:
string

Ax.util.jar.JarArchive.toFOPTableBody

string Ax.util.jar.JarArchive.toFOPTableBody(
	object config,
	double width
)
Info:
Convert the ResultSet to a FOP XML table body document so it can be integrated into another document
Parameters:
config - 
width - 
Returns:
string

Ax.util.jar.JarArchive.toHTML

string Ax.util.jar.JarArchive.toHTML()
Returns:
string

Ax.util.jar.JarArchive.toHTML

string Ax.util.jar.JarArchive.toHTML(
	object config
)
Info:
Convert the ResultSet to a HTML document
Parameters:
config - 
Returns:
string

Ax.util.jar.JarArchive.toInputStream

object Ax.util.jar.JarArchive.toInputStream()
Info:
Returns an InputStream for the jar archive
Returns:
object

Ax.util.jar.JarArchive.toJSON

string Ax.util.jar.JarArchive.toJSON()
Info:
Convert a ResultSet to JSON that can be digested by aa JSON2ResultSet again into a SQLResultSetArray
Returns:
string

Ax.util.jar.JarArchive.toJSON

string Ax.util.jar.JarArchive.toJSON(
	object config
)
Info:
Convert a ResultSet to JSON
Parameters:
config - 
Returns:
string

Ax.util.jar.JarArchive.toJavaScript

string Ax.util.jar.JarArchive.toJavaScript()
Info:
Convert the ResultSet to a Javascript declaration (useful for coding)
Returns:
string

Ax.util.jar.JarArchive.toPDF

byte[] Ax.util.jar.JarArchive.toPDF()
Returns:
byte[]

Ax.util.jar.JarArchive.toPDF

byte[] Ax.util.jar.JarArchive.toPDF(
	object config
)
Info:
Convert the ResultSet to a PDF document
Parameters:
config - 
Returns:
byte[]

Ax.util.jar.JarArchive.toPDF

byte[] Ax.util.jar.JarArchive.toPDF(
	string fop
)
Info:
Useful method for testing so we can produce a FOP and transform to PDF
Parameters:
fop - 
Returns:
byte[]

Ax.util.jar.JarArchive.toResultSet

resultset Ax.util.jar.JarArchive.toResultSet()
Info:
Generates a ResultSet from the jar archive.
Returns:
resultset

Ax.util.jar.JarArchive.toResultSet

resultset Ax.util.jar.JarArchive.toResultSet(
	object value
)
Info:
Perform a conversion to resultset
Parameters:
value - 
Returns:
resultset

Ax.util.jar.JarArchive.toRow

object Ax.util.jar.JarArchive.toRow()
Returns:
object

Ax.util.jar.JarArchive.toSQLCA

object Ax.util.jar.JarArchive.toSQLCA(
	object value
)
Info:
Converts the object to SQLCA
Parameters:
value - 
Returns:
object

Ax.util.jar.JarArchive.toText

string Ax.util.jar.JarArchive.toText()
Returns:
string

Ax.util.jar.JarArchive.toText

string Ax.util.jar.JarArchive.toText(
	object config
)
Info:
Convert the ResultSet to a TEXT document
Parameters:
config - 
Returns:
string

Ax.util.jar.JarArchive.toXLS

byte[] Ax.util.jar.JarArchive.toXLS()
Info:
Convert a ResultSet to Excel (XLS)
Returns:
byte[]

Ax.util.jar.JarArchive.toXLSX

byte[] Ax.util.jar.JarArchive.toXLSX()
Info:
Convert a ResultSet to Excel (XLSX using streaming api)
Returns:
byte[]

14 Object

Class Ax.util.js.object


Method Summary

Modifier and Type
Method
Description
static Object 
assign(Object[] args)
This method copies all enumerable own properties from one or more source objects to a target object.

Method Detail

Ax.util.js.object.assign

static object Ax.util.js.object.assign(
	object[] args
)
Info:
This method copies all enumerable own properties from one or more source objects to a target object. It returns the target object.
Parameters:
args - the source objects
Returns:
object

Example
Copy
const source = { b: 4, c: 5 };
 	   let row = Ax.db.executeQuery("SELECT tabname , tabid ,  3 as b FROM systables").firstOne()
     const obj  = Ax.util.js.object.assign( { a: 1, b: 2 }, row);
     const obj2 = Ax.util.js.object.assign( { a: 1, b: 2 }, source);
     // { "tabid": 1, "a": 1, "tabname": "systables", "b": 3 }
     // { "a": 1, "b": 4, "c": 5 }

15 CRC32

Class Ax.util.zip.CRC32


Computable CRC32 (put under compress as Java CRC32 class belongs to java.util.Zip)

Constructor Summary

Method
Description
Creates a new CRC instance.

Method Summary

Modifier and Type
Method
Description
long 
getCRC()
Returns the CRC-32 value.
void 
update(Object data)
Updates the CRC-32 checksum with the specified array of bytes.

Constructor Detail

Ax.util.zip.CRC32.JSCRC32

Ax.util.zip.CRC32.JSCRC32()
Info:
Creates a new CRC instance.

Example
Copy
var crc32 = new Ax.util.zip.CRC32();

Method Detail

Ax.util.zip.CRC32.getCRC

long Ax.util.zip.CRC32.getCRC()
Info:
Returns the CRC-32 value.
Returns:
long

Ax.util.zip.CRC32.update

null Ax.util.zip.CRC32.update(
	object data
)
Info:
Updates the CRC-32 checksum with the specified array of bytes.
Parameters:
data - 
Returns:
null

16 Zip

Class Ax.util.zip.Zip


Class to compress zip files.

Constructor Summary

Method
Description
JSZip(Ax.sql.Blob blob)
Creates a new zip compressor instance with the given Blob as destination.
JSZip(Ax.io.File file)
Creates a new zip compressor instance with the given file as destination.

Method Summary

Modifier and Type
Method
Description
void 
close()
Flushes data to the destination resource and closes all resources.
void 
zipBlob(JDBCBlob blob)
Compresses the given Blob object and attaches it to the destination zip container.
void 
zipBlob(JDBCBlob blob, Ax.text.String name)
Compresses the given Blob object and attaches it to the destination zip container.
void 
zipFile(Ax.io.File file)
Compresses the given file and attaches it to the destination zip container.
void 
zipFile(Ax.io.File file, Ax.text.String fileName)
Compresses the given file and attaches it to the destination zip container.
void 
zipFile(JDBCBlob blob)
Compresses the given Blob object and attaches it to the destination zip container.
void 
zipFile(JDBCBlob blob, Ax.text.String name)
Compresses the given Blob object and attaches it to the destination zip container.

Constructor Detail

Ax.util.zip.Zip.JSZip

Ax.util.zip.Zip.JSZip(
	object blob
						)
Info:
Creates a new zip compressor instance with the given Blob as destination.
Parameters:
blob - the destination Blob object

Ax.util.zip.Zip.JSZip

Ax.util.zip.Zip.JSZip(
	file file
						)
Info:
Creates a new zip compressor instance with the given file as destination.
Parameters:
file - the destination file

Example
Copy
var zip = new Ax.util.zip.Zip(new Ax.io.File("/tmp/ziptest.zip"));

Method Detail

Ax.util.zip.Zip.close

null Ax.util.zip.Zip.close()
Info:
Flushes data to the destination resource and closes all resources. Otherwise it will happen on script termination.
Returns:
null

Ax.util.zip.Zip.zipBlob

null Ax.util.zip.Zip.zipBlob(
	object blob
)
Info:
Compresses the given Blob object and attaches it to the destination zip container.
Parameters:
blob - the Blob to compress
Returns:
null

Ax.util.zip.Zip.zipBlob

null Ax.util.zip.Zip.zipBlob(
	object blob,
	string name
)
Info:
Compresses the given Blob object and attaches it to the destination zip container. The second parameter will be the file name inside the zip container (can be a relative path).
Parameters:
blob - the Blob to compress
name - the file name in the zip container
Returns:
null

Ax.util.zip.Zip.zipFile

null Ax.util.zip.Zip.zipFile(
	file file
)
Info:
Compresses the given file and attaches it to the destination zip container.
Parameters:
file - the file to compress
Returns:
null

Ax.util.zip.Zip.zipFile

null Ax.util.zip.Zip.zipFile(
	file file,
	string fileName
)
Info:
Compresses the given file and attaches it to the destination zip container. The second parameter will be the file name inside the zip container (can be a relative path).
Parameters:
file - the file to compress
fileName - the file name in the zip container
Returns:
null

Ax.util.zip.Zip.zipFile

null Ax.util.zip.Zip.zipFile(
	object blob
)
Info:
Compresses the given Blob object and attaches it to the destination zip container.
Parameters:
blob - the Blob to compress
Returns:
null

Ax.util.zip.Zip.zipFile

null Ax.util.zip.Zip.zipFile(
	object blob,
	string name
)
Info:
Compresses the given Blob object and attaches it to the destination zip container. The second parameter will be the file name inside the zip container (can be a relative path).
Parameters:
blob - the Blob to compress
name - the file name in the zip container
Returns:
null

17 Unzip

Class Ax.util.zip.Unzip


Utility class to use zip uncompression.

Constructor Summary

Method
Description
JSUnzip(byte[] data)
Creates a new zip uncompressor instance with the given compressed source and destination.
JSUnzip(byte[] data, Ax.text.String tempDirName)
Creates a new zip uncompressor instance with the given compressed source and destination.
JSUnzip(byte[] data, Ax.io.File destDir)
Creates a new zip uncompressor instance with the given compressed source and destination.
JSUnzip(Ax.sql.Blob blob, Ax.io.File destDir)
Creates a new zip uncompressor instance with the given compressed source and destination.
JSUnzip(Ax.io.File file, Ax.io.File destDir)
Creates a new zip uncompressor instance with the given compressed source and destination.

Method Summary

Modifier and Type
Method
Description
void 
forEach(Consumer arg0)
Provides an iterator over the unzipped files.

Constructor Detail

Ax.util.zip.Unzip.JSUnzip

Ax.util.zip.Unzip.JSUnzip(
	byte[] data
						)
Info:
Creates a new zip uncompressor instance with the given compressed source and destination.
Parameters:
data - the compressed data

Ax.util.zip.Unzip.JSUnzip

Ax.util.zip.Unzip.JSUnzip(
	byte[] data,
	string tempDirName
						)
Info:
Creates a new zip uncompressor instance with the given compressed source and destination.
Parameters:
data - the compressed data
tempDirName - 

Ax.util.zip.Unzip.JSUnzip

Ax.util.zip.Unzip.JSUnzip(
	byte[] data,
	file destDir
						)
Info:
Creates a new zip uncompressor instance with the given compressed source and destination.
Parameters:
data - the compressed data
destDir - the uncompression destination file

Ax.util.zip.Unzip.JSUnzip

Ax.util.zip.Unzip.JSUnzip(
	object blob,
	file destDir
						)
Info:
Creates a new zip uncompressor instance with the given compressed source and destination.
Parameters:
blob - the compressed data
destDir - the uncompression destination file

Ax.util.zip.Unzip.JSUnzip

Ax.util.zip.Unzip.JSUnzip(
	file file,
	file destDir
						)
Info:
Creates a new zip uncompressor instance with the given compressed source and destination.
Parameters:
file - the compressed data
destDir - the uncompression destination file

Example
Copy
var compressed = new Ax.io.File("/tmp/ziptest.zip");
         for (var file of new Ax.util.zip.Unzip(compressed, new Ax.io.File("/tmp/unzipdir"))) {
     		   console.log("Unzipped: " + file);
     	   }

Method Detail

Ax.util.zip.Unzip.forEach

null Ax.util.zip.Unzip.forEach(
	object arg0
)
Parameters:
arg0 - 
Returns:
null

Ax.util.zip.Unzip.iterator

object Ax.util.zip.Unzip.iterator()
Info:
Provides an iterator over the unzipped files.
Returns:
object

Ax.util.zip.Unzip.spliterator

object Ax.util.zip.Unzip.spliterator()
Returns:
object

18 Gzip

Class Ax.util.zip.Gzip


Utility class to use gzip compression.

Constructor Summary

Method
Description
JSGzip()
Creates a new Gzip compressor object to memory destination
JSGzip(Ax.sql.Blob blob)
Creates a new Gzip compressor object with a Blob object as a destination for the compressed data.
JSGzip(Ax.io.File file)
Creates a new Gzip compressor object with a file as a destination for the compressed data.

Method Summary

Modifier and Type
Method
Description
void 
close()
Flushes data to the destination resource and closes all resources.
Ax.util.zip.Gzip 
Compresses the given object to the destination resource using gzip.
byte[] 
Ax.text.String 

Constructor Detail

Ax.util.zip.Gzip.JSGzip

Ax.util.zip.Gzip.JSGzip()
Info:
Creates a new Gzip compressor object to memory destination

Ax.util.zip.Gzip.JSGzip

Ax.util.zip.Gzip.JSGzip(
	object blob
						)
Info:
Creates a new Gzip compressor object with a Blob object as a destination for the compressed data.
Parameters:
blob - the source Blob object

Ax.util.zip.Gzip.JSGzip

Ax.util.zip.Gzip.JSGzip(
	file file
						)
Info:
Creates a new Gzip compressor object with a file as a destination for the compressed data.
Parameters:
file - the source file

Example
Copy
var src  = new Ax.io.File("/etc/services");
         var gzip = new Ax.util.zip.Gzip(dst);

Method Detail

Ax.util.zip.Gzip.close

null Ax.util.zip.Gzip.close()
Info:
Flushes data to the destination resource and closes all resources. Otherwise it will happen on script termination.
Returns:
null

Ax.util.zip.Gzip.compress

object Ax.util.zip.Gzip.compress(
	object src
)
Info:
Compresses the given object to the destination resource using gzip. The source object must be convertible to InputStream (file, Blob, URL, byte[]...).
Parameters:
src - the source object to compress
Returns:
object

Ax.util.zip.Gzip.getBytes

byte[] Ax.util.zip.Gzip.getBytes()
Returns:
byte[]

Ax.util.zip.Gzip.toBase64

string Ax.util.zip.Gzip.toBase64()
Returns:
string

19 Gunzip

Class Ax.util.zip.Gunzip


Utility class to use gunzip uncompression.

Constructor Summary

Method
Description
JSGunzip(byte[] data)
Creates a new Gunzip uncompressor object with a compressed file as source of compressed data.
JSGunzip(Ax.text.String base64)
Creates a new Gunzip uncompressor object with a compressed file as source of compressed data.
JSGunzip(Ax.sql.Blob blob)
Creates a new Gunzip uncompressor object with a compressed file as source of compressed data.
JSGunzip(Ax.io.File file)
Creates a new Gunzip uncompressor object with a Blob object as source of compressed data.

Method Summary

Modifier and Type
Method
Description
byte[] 
byte[] 
Uncompresses the source data.

Constructor Detail

Ax.util.zip.Gunzip.JSGunzip

Ax.util.zip.Gunzip.JSGunzip(
	byte[] data
						)
Info:
Creates a new Gunzip uncompressor object with a compressed file as source of compressed data.
Parameters:
data - the source byte[] object

Ax.util.zip.Gunzip.JSGunzip

Ax.util.zip.Gunzip.JSGunzip(
	string base64
						)
Info:
Creates a new Gunzip uncompressor object with a compressed file as source of compressed data.
Parameters:
base64 - 

Ax.util.zip.Gunzip.JSGunzip

Ax.util.zip.Gunzip.JSGunzip(
	object blob
						)
Info:
Creates a new Gunzip uncompressor object with a compressed file as source of compressed data.
Parameters:
blob - the source Blob object

Ax.util.zip.Gunzip.JSGunzip

Ax.util.zip.Gunzip.JSGunzip(
	file file
						)
Info:
Creates a new Gunzip uncompressor object with a Blob object as source of compressed data.
Parameters:
file - the source file

Example
Copy
var src = new Ax.io.File("/tmp/services.gz");
         var gunzip = new Ax.util.zip.Gunzip(src);

Method Detail

Ax.util.zip.Gunzip.getBytes

byte[] Ax.util.zip.Gunzip.getBytes()
Returns:
byte[]

Ax.util.zip.Gunzip.uncompress

byte[] Ax.util.zip.Gunzip.uncompress()
Info:
Uncompresses the source data.
Returns:
byte[]

20 Bzip2

Class Ax.util.zip.Bzip2


Utility class for file compression with b2zip.

Constructor Summary

Method
Description
Creates a new bzip2 compressor instance.

Method Summary

Modifier and Type
Method
Description
byte[] 
Compresses the source object with bzip2.
byte[] 
Uncompresses the source object with b2zip.

Constructor Detail

Ax.util.zip.Bzip2.JSBzip2

Ax.util.zip.Bzip2.JSBzip2()
Info:
Creates a new bzip2 compressor instance.

Example
Copy
var bzip2 = new Ax.util.zip.Bzip2();

Method Detail

Ax.util.zip.Bzip2.compress

byte[] Ax.util.zip.Bzip2.compress(
	object src
)
Info:
Compresses the source object with bzip2. The object must be convertible to InputStream (file, Blob, URL, byte[]...).
Parameters:
src - the source object to compress
Returns:
byte[]

Ax.util.zip.Bzip2.uncompress

byte[] Ax.util.zip.Bzip2.uncompress(
	object src
)
Info:
Uncompresses the source object with b2zip. The object must be convertible to InputStream (file, Blob, URL, byte[]...).
Parameters:
src - the compressed object
Returns:
byte[]