public static void main(String[] args) throws Exception {
		getStateCode();
		getDistrictCode();
		getLocationCode();
		getStatusCode();
		ICsvBeanReader beanReader = null;
		try {
			BufferedWriter writer = new BufferedWriter(new FileWriter(
					"E:\\Android\\workspace\\OfflinePinFinder\\app\\src\\main\\assets\\sql\\pincode\\pincode_1.sql"));

			beanReader = new CsvBeanReader(new FileReader(
					"D:\\Download\\all_india_PO_list_without_APS_offices_ver2.csv"), CsvPreference.STANDARD_PREFERENCE);

			// the header elements are used to map the values to the bean (names
			// must match)
			final String[] header = beanReader.getHeader(true);
			final CellProcessor[] processors = getProcessors();
			// CsvListReader)
			PostOfficeModel officeModel;
			int i = 1;
			while ((officeModel = beanReader.read(PostOfficeModel.class, header, processors)) != null) {
				if (i % 9000 == 0) {
					writer.flush();
					writer.close();
					writer = new BufferedWriter(new FileWriter(
							"E:\\Android\\workspace\\OfflinePinFinder\\app\\src\\main\\assets\\sql\\pincode\\pincode_"
									+ (i / 9000 + 1) + ".sql"));
				}
				if (!"Null".equalsIgnoreCase(officeModel.getStateName())) {
					String line = null;
					try {
						line = SQL
								.replaceAll(
										"<OfficeName>",
										officeModel.getOfficeName().replaceAll(" S.O", "").replaceAll(" B.O", "")
										.replaceAll(" H.O", "").replaceAll(" G.P.O", "").trim()
										.replaceAll("'", "''"))
										.replaceAll("<Pincode>", officeModel.getPincode())
										.replaceAll(
												"<Status>",
												STATUS_MAP.get(officeModel.getOfficeType().trim()
														+ officeModel.getDeliveryStatus().trim()))
														.replaceAll(
																"<HeadOffice>",
																officeModel.getRelatedHeadoffice().equalsIgnoreCase("NA") ? "" : officeModel
																		.getRelatedHeadoffice().replaceAll(" H.O", "").replaceAll(" G.P.O", "")
																		.trim().replaceAll("'", "''"))
																		.replaceAll(
																				"<SubOffice>",
																				officeModel.getRelatedSuboffice().equalsIgnoreCase("NA") ? "" : officeModel
																						.getRelatedSuboffice().replaceAll(" S.O", "").trim()
																						.replaceAll("'", "''"))
																						.replaceAll(
																								"<Location>",
																								LOCATION_MAP.get(officeModel.getTaluk().replaceAll("\\*", "").replaceAll("\\\\+","").trim()
																										.toLowerCase()))
																										.replaceAll(
																												"<Telephone>",
																												officeModel.getTelephone().equalsIgnoreCase("NA") ? "" : officeModel
																														.getTelephone().trim())
																														.replaceAll("<State>", STATE_MAP.get(formatString(officeModel.getStateName())))
																														.replaceAll("<District>", DISTRICT_MAP.get(formatString(officeModel.getDistrictName())));
					} catch (Exception ex) {
						ex.printStackTrace();
						System.out.println(officeModel.getOfficeName());
					}
					writer.write(line);
					writer.newLine();
				}
				i++;
			}

			writer.flush();
			writer.close();
		} finally {
			if (beanReader != null) {
				beanReader.close();
			}
		}
	}