use of org.adempiere.webui.util.ReaderInputStream in project adempiere by adempiere.
the class WFileImport method cmd_loadFile.
/**************************************************************************
* Load File
*/
private void cmd_loadFile() {
Media media = null;
media = Fileupload.get();
if (media == null)
return;
if (media.isBinary()) {
m_file_istream = media.getStreamData();
} else {
ListItem listitem = fCharset.getSelectedItem();
if (listitem == null) {
m_file_istream = new ReaderInputStream(media.getReaderData());
} else {
Charset charset = (Charset) listitem.getValue();
m_file_istream = new ReaderInputStream(media.getReaderData(), charset.name());
}
}
log.config(media.getName());
bFile.setLabel(media.getName());
cmd_reloadFile();
}
Aggregations