public ObjectStream<DocumentSample> create(String[] args) {
Parameters params = ArgumentParser.parse(args, Parameters.class);
CmdLineUtil.checkInputFile("Data", params.getData());
InputStreamFactory sampleDataIn = CmdLineUtil.createInputStreamFactory(params.getData());
ObjectStream<String> lineStream=null;
try {
lineStream = new PlainTextByLineStream(sampleDataIn, params.getEncoding());
} catch (IOException ex) {
CmdLineUtil.handleCreateObjectStreamError(ex);