java test
void outputIds(){
Iterator<String> it = blogIds.iterator();
FileOutputStream fos = null;
OutputStreamWriter osw = null;
try {
fos = new FileOutputStream(outputDir, true);
osw = new OutputStreamWriter(fos, "UTF-8");
while(it.hasNext()){
try {
osw.write(it.next() + "\n");
} catch (Exception e) {
e.printStackTrace();
}
}
osw.flush();
fos.flush();
osw.close();
fos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}