Methods Summary |
---|
public static java.lang.String[] | acopy(java.lang.String[] g)
String[] res = new String[g.length];
for (int i = 0; i < g.length; i++) {
res[i] = new String(g[i]);
}
return res;
|
public static java.lang.String[][] | acopy(java.lang.String[][] g)
String[][] res = new String[g.length][];
for (int i = 0; i < g.length; i++) {
res[i] = acopy(g[i]);
}
return res;
|
public static java.lang.String[][] | acopyWithDelimAndPrm(java.lang.String[][] g, java.lang.String[] delim, java.lang.String[] prm)
String[][] res = new String[g.length+2][];
int i, j;
for (i = 0, j = 0; i < g.length-1; i++) {
res[j++] = acopy(g[i]);
}
res[j++] = acopy(delim);
res[j++] = acopy(prm);
res[j++] = acopy(g[i++]);
return res;
|
public static java.lang.String[][] | acopyWithoutDelimAndPrm(java.lang.String[][] g, int no)
String[][] res = new String[g.length-2][];
if (0 <= no && no < g.length) {
for (int i = 0, j = 0; i < g.length; i++) {
if (i != no && i != no - 1) {
res[j++] = acopy(g[i]);
}
}
return res;
} else {
return acopy(g);
}
|
public void | appendPrmWhole(java.lang.String[] prm)
guts = acopyWithDelimAndPrm(guts,
new String[]
{ TestSipHeader2.makeDelimiterFor(this) },
prm);
|
public static java.lang.String | concata(java.lang.String[] a)
String res = "";
for (int i = 0; i < a.length; i++) {
res = res + a[i];
}
return res;
|
public static java.lang.String | concata(java.lang.String[][] a, int i0, int im)
String res = "";
if (a.length < im) {
im = a.length;
}
for (int i = i0; i < im; i++) {
res = res + concata(a[i]);
}
return res;
|
public int | findPrmNam(java.lang.String name)
for (int i = 0, imax = guts.length / 2 - 2; i < imax; i++) {
if (name.equals(getPrmNam(i))) {
return i;
}
}
return -1;
|
public java.lang.String | getHeaderValue()
return concata(guts, 2, guts.length-1);
|
public java.lang.String | getName()
return guts[0][0];
|
public java.lang.String[] | getParameterNames()
String[] res = new String [guts.length / 2 - 2];
for (int i = 0; i < res.length; i++) {
res[i] = getPrmNam(i);
}
return res;
|
public java.lang.String | getPrmNam(int i)
/*
* myout.println("index: " + i +" => " + ((i + 2) * 2
* +" guts.length: "+guts.length));
*/
if ((i + 2) * 2 >= guts.length)
return null;
return guts[(i + 2) * 2][0];
|
public java.lang.String | getPrmVal(int i)
return guts[(i + 2) * 2][2];
|
public java.lang.String[] | getPrmWhole(int i)
return guts[(i + 2) *2];
|
public java.lang.String | getValue()
return guts[2][0];
|
public void | rmvPrm(int i)
guts = acopyWithoutDelimAndPrm(guts, (i + 2) * 2);
|
public void | setName(java.lang.String n)
guts[0][0] = n;
|
public void | setOrAddPrmWhole(java.lang.String[] prm)
int prmN = findPrmNam(prm[0]);
if (-1 != prmN) {
// myout.println("setOrAddPrmWhole: set");
setPrmWhole(prmN, prm);
} else {
// myout.println("setOrAddPrmWhole: append");
appendPrmWhole(prm);
}
|
public void | setPrmNam(int i, java.lang.String n)
guts[(i + 2) * 2][0] = n;
|
public void | setPrmVal(int i, java.lang.String v)
guts[(i + 2) *2][2] = v;
|
public void | setPrmWhole(int i, java.lang.String[] p)
guts[(i + 2) *2] = p;
|
public void | setValue(java.lang.String v)
guts[2][0] = v;
|
public java.lang.String | toString()
return concata(guts, 0, guts.length);
|