comparison gnv-artifacts/src/main/java/de/intevation/gnv/exports/DefaultExport.java @ 778:9a828e5a2390

Removed trailing whitespace gnv-artifacts/trunk@851 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 29 Mar 2010 07:58:51 +0000
parents a0e63136954e
children b1f5f2a8840f
comparison
equal deleted inserted replaced
777:8009961db1cb 778:9a828e5a2390
50 * @param writer CSVWriter to write the csv document. 50 * @param writer CSVWriter to write the csv document.
51 * 51 *
52 * @throws StateException 52 * @throws StateException
53 */ 53 */
54 protected void writeData( 54 protected void writeData(
55 Profile profile, 55 Profile profile,
56 Collection result, 56 Collection result,
57 CSVWriter writer 57 CSVWriter writer
58 ) 58 )
59 throws StateException { 59 throws StateException {
60 log.debug("create content for export."); 60 log.debug("create content for export.");
85 * @throws UnsupportedEncodingException if the encoding was not accepted. 85 * @throws UnsupportedEncodingException if the encoding was not accepted.
86 * @throws StateException if result is null. 86 * @throws StateException if result is null.
87 */ 87 */
88 public void create( 88 public void create(
89 Profile profile, 89 Profile profile,
90 OutputStream outputStream, 90 OutputStream outputStream,
91 Collection result 91 Collection result
92 ) 92 )
93 throws 93 throws
94 IOException, 94 IOException,
95 UnsupportedEncodingException, 95 UnsupportedEncodingException,
96 StateException 96 StateException
97 { 97 {
98 if (result == null) { 98 if (result == null) {
99 String msg = "No data given for generation of " + 99 String msg = "No data given for generation of " +
100 profile.getType() + " file."; 100 profile.getType() + " file.";
101 log.error(msg); 101 log.error(msg);
103 } 103 }
104 104
105 CSVWriter writer = new CSVWriter( 105 CSVWriter writer = new CSVWriter(
106 new OutputStreamWriter( 106 new OutputStreamWriter(
107 outputStream, 107 outputStream,
108 profile.getEncoding()), 108 profile.getEncoding()),
109 profile.getSeparator(), 109 profile.getSeparator(),
110 profile.getQuoteCharacter(), 110 profile.getQuoteCharacter(),
111 profile.getEscapeCharacter()); 111 profile.getEscapeCharacter());
112 112
113 writeData(profile, result, writer); 113 writeData(profile, result, writer);
114 114
115 writer.close(); 115 writer.close();
116 } 116 }

http://dive4elements.wald.intevation.org