Skip to content

Instantly share code, notes, and snippets.

@SriniBlog
Created December 23, 2015 16:11
Show Gist options
  • Save SriniBlog/f129d2af0f84f06ed1cd to your computer and use it in GitHub Desktop.
Save SriniBlog/f129d2af0f84f06ed1cd to your computer and use it in GitHub Desktop.
If you want to combine many fields into a array to pass it as a variable to another function then this method will help to create the array
public void makeArray5(String[] a, String[] b, String[] c, String[] d, String[] e, ResultList result, Container container) throws StreamTransformationException{
String[] str = new String[5];
try{
str[0] = a[0].trim();
str[1] = b[0].trim();
str[2] = c[0].trim();
str[3] = d[0].trim();
str[4] = e[0].trim();
for (int i = 0; i < 10; i++) {
result.addValue(str[i]);
}
}catch(Exception ee){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment