} else if (file instanceof InputStream) {
fr = new InputStreamReader((InputStream) file, charset);
} else if (file instanceof java.io.Reader) {
fr = (java.io.Reader) file;
} else
throw new SysException("Unsupported type of parameter ('file')");
String[] vs;
ArrayList<String> prms = upd.getParamNames();
int j = 0;
PreparedStatement st = upd.getStatement(con);
try {
while ((vs = Strings.parseXVSLine(fr, sysch, delch)).length > 0) {
for (int i = prms.size() - 1; i >= 0; i--) {
String name = prms.get(i);
Integer ind = names.get(name);
if ((ind != null) && (vs.length > ind)) {
upd.setParam(st, name, vs[ind], java.sql.Types.VARCHAR);
} else {
upd.setParam(st, name, null, java.sql.Types.VARCHAR);
}
}
st.execute();
j++;
if (j % 10 == 0) {
con.commit();
}
}
con.commit();
} finally {
upd.freeStatement(st);
}
return true;
} catch (java.sql.SQLException ex) {
throw new SysException(ex);
} catch (IOException ex) {
throw new SysException(ex);
} finally {
Manager.freeConnection(con);
}
}