Package com.basiscomponents.db.export
Class TxtExport
- java.lang.Object
-
- com.basiscomponents.db.export.TxtExport
-
public class TxtExport extends Object
-
-
Constructor Summary
Constructors Constructor Description TxtExport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
writeTXT(ResultSet resultSet, Writer writer, DataRow baseDR, boolean useLabel)
Uses the given Writer object to write the ResultSet's content as plain text to the output stream.
-
-
-
Method Detail
-
writeTXT
public static void writeTXT(ResultSet resultSet, Writer writer, DataRow baseDR, boolean useLabel) throws Exception
Uses the given Writer object to write the ResultSet's content as plain text to the output stream.
Example Usage with an FileWriter object:
ResultSet rs = new ResultSet(); DataRow dr = new DataRow(); dr.setFieldValue("feld1", "TEST1"); dr.setFieldValue("feld2", "TEST2"); rs.add(dr); dr = new DataRow(); dr.setFieldValue("feld1", "TEST1"); dr.setFieldValue("feld3", "TEST3"); rs.add(dr); FileWriter fw = new FileWriter("D:/test.txt"); ResultSetExporter.writeTXT(rs, fw); fw.flush(); fw.close();
- Parameters:
resultSet
- The ResultSet to export.writer
- A java.io.Writer Instance.- Throws:
Exception
-
-