Code example for FileWriter

Methods: append

0
	private static void write_mark(Cursor c, FileWriter fw) throws IOException
	{ 
		String cap = c.getString(2);
		boolean open = cap == null || cap.length() == 0;
		boolean wep = cap != null && cap.contains("WEP");
		fw.append(MARK_START);
		fw.append(NAME_START);
		fw.append(c.getString(1)); // SSID
		fw.append(NAME_END);
		fw.append(DESCRIPTION_START);
		fw.append(GENERICS_INFO_1);
		fw.append(c.getString(0)); // BSSID
		fw.append(GENERICS_INFO_2);
		fw.append(cap); // CAPABILITIES
		fw.append(GENERICS_INFO_3);
		fw.append(c.getString(3)); // FREQUENCY
		fw.append(GENERICS_INFO_4);
		fw.append(c.getString(4)); // LEVEL
		fw.append(GENERICS_INFO_5);
		fw.append(c.getString(8));
		fw.append(GENERICS_INFO_6);
		fw.append(df.format(new Date(c.getLong(8)))); // READABLE DATE
		fw.append(GENERICS_INFO_END);
		fw.append(DESCRIPTION_END);
		fw.append(open ? STYLE_GREEN : (wep ? STYLE_YELLOW : STYLE_RED)); // Dot color
		fw.append(POINT_START);
		fw.append(COORDINATES_START);
		fw.append(c.getDouble(6) + "," + c.getDouble(5) + "," + c.getDouble(7)); // LAT, LON, ALT
		fw.append(COORDINATES_END);
		fw.append(POINT_END);
		fw.append(MARK_END);
	} 
 
	private static void destroy_cursor(Cursor c)
	{ 
		if (c != null)