MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / exportData

Method exportData

src/main/java/IE/ArchiveTemplates.java:133–166  ·  view source on GitHub ↗
(String arhPath)

Source from the content-addressed store, hash-verified

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();

Callers 1

ArchiveTemplatesMethod · 0.95

Calls 9

getItemCountMethod · 0.95
getMessageMethod · 0.95
getDayTimeMethod · 0.95
createConnectionMethod · 0.95
localDateMethod · 0.95
fileWriteUtfMethod · 0.95
appendMethod · 0.80
toStringMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected