public static String[][] read(final InputStream is,final String delim) throws IOException {
  String[][] result=null;
  List<String[]> list=new ArrayList<String[]>();
  String inputLine;
  BufferedReader reader=new BufferedReader(new InputStreamReader(is,"UTF-8"));
  while ((inputLine=reader.readLine()) != null) {
    try {
      String[] item;
      if (delim == null) {
        item=parseLine(inputLine,DELIM_CHAR);
      }
 else {
        item=parseLine(inputLine,delim);
      }
      if (item != null) {
        list.add(item);
      }
    }
 catch (    Exception e) {
    }
  }
  reader.close();
  if (list.size() > 0) {
    result=new String[list.size()][];
    list.toArray(result);
  }
  return result;
}

public static String [ ] [ ] read ( final InputStream is , final String delim ) throws IOException { String [ ] [ ] result = null ; List < String [ ] > list = new ArrayList < String [ ] > ( ) ; String inputLine ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( is , "UTF-8" ) ) ; while ( ( inputLine = reader . readLine ( ) ) != null ) { try { String [ ] item ; if ( delim == null ) { item = parseLine ( inputLine , DELIM_CHAR ) ; } else { item = parseLine ( inputLine , delim ) ; } if ( item != null ) { list . add ( item ) ; } } catch ( Exception e ) { } } reader . close ( ) ; if ( list . size ( ) > 0 ) { result = new String [ list . size ( ) ] [ ] ; list . toArray ( result ) ; } return result ; }
parses an input stream and returns a string [ ] [ ] object .
