(String arhPath)
| 131 | } |
| 132 | |
| 133 | public final void exportData(String arhPath) { |
| 134 | int items=getItemCount(); |
| 135 | StringBuffer body=new StringBuffer(); |
| 136 | |
| 137 | for(int i=0; i<items; i++){ |
| 138 | Msg m=getMessage(i); |
| 139 | body.append(start_item) |
| 140 | .append("\r\n") |
| 141 | .append(start_date) |
| 142 | .append(m.getDayTime()) |
| 143 | .append(end_date) |
| 144 | .append("\r\n") |
| 145 | .append(start_from) |
| 146 | .append(m.from) |
| 147 | .append(end_from) |
| 148 | .append("\r\n") |
| 149 | .append(start_subj); |
| 150 | if (m.subject!=null) { |
| 151 | body.append(m.subject); |
| 152 | } |
| 153 | body.append(end_subj) |
| 154 | .append("\r\n") |
| 155 | .append(start_body) |
| 156 | .append(m.body) |
| 157 | .append(end_body) |
| 158 | .append("\r\n") |
| 159 | .append(end_item) |
| 160 | .append("\r\n\r\n"); |
| 161 | } |
| 162 | |
| 163 | FileIO file = FileIO.createConnection(arhPath+((where==1)?"archive_":"template_")+Time.localDate()+".txt"); |
| 164 | file.fileWriteUtf(body.toString()); |
| 165 | archive.close(); |
| 166 | } |
| 167 | |
| 168 | public int getItemCount() { |
| 169 | return archive.size(); |
no test coverage detected