I use string delimiter functionality and retrieve value from log like following format on text file system SubTicket id ticket id ----------------------------------------------------------------------------------------------------- Tata268535910#268898468#2684362561035766 Unisys 1035766 Infosys 268535910#268898468#268436258 1035766 Kanbay 268535910#268898468#268436254 1035766 But after retieving values i nned to arrange out put in the following way system SubTicket id ticket id ______________________________________________________________________________________________________ Kanbay 268535910#268898468#268436254 1035766 Tata268535910#268898468#268436256 1035766 Infosys 268535910#268898468#268436258 1035766 Unisys 1035766
it is only example.........lot of numbers comes on subticket id......based on that ineed to arranging asending.....Is it possible in java.....If so can any body help me with code
.if i look generated file in notepad it working properly..but only in editplus some special characters like[][][] come. i use setLength() method in string buffer..suggestions and help welcome
one more thing inotice that..if i look generated file in notepad it working properly..but only in editplus some special characters like[][][] come...suggestions and help welcome
i need to arrange out put in proper format while writing to a file.For this purpose i set maxium length as 50.My idea is generated substring is less than 5O add that much blank space and write to file.For this ineed to know one "\t" is how much character and secondly how implement that......My logic is that set maxium length as 50 and store the generated string on temporary variable .Find the difference betwwen maxium and generated string and store in an intger variable delta....after that i could not procced how append "\t" with the generated substring.Can any body help with code it will be better help for me....
am reading a file line by line...But in some case some exception comes,i catch exception but program not exceute next line. please tell how skip the exception comes on line and exceute next line.I used this but it shows compilation error finally{ continue; } but it shows compilation error try {
FileInputStream fstream = new FileInputStream(args[0]); log"); System.out.println(fstream); FileOutputStream fstream1 = new FileOutputStream("C://Documents and Settings/sp0c5899/Desktop/msgtracking.log"); DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); DataOutputStream out = new DataOutputStream(fstream1); BufferedWriter br1 = new BufferedWriter(new OutputStreamWriter(out)); try {
System.out.println("Line 1 : " + lin);
while ((line = br.readLine()) !=null) {
some condition checking
} catch (Exception e) {//Catch exception if any System.err.println("Error: " + e); e.printStackTrace();
}
} catch (Exception e) {//Catch exception if any System.err.println("Error: " + e); } finally{ continue; } }
am reading a file line by line...But in some case some exception comes,i catch exception but program not exceute next line. please tell how skip the exception comes on line and exceute next line.I used this but it shows compilation error finally{ continue; } but it shows compilation error try {
FileInputStream fstream = new FileInputStream(args[0]); log"); System.out.println(fstream); FileOutputStream fstream1 = new FileOutputStream("C://Documents and Settings/sp0c5899/Desktop/msgtracking.log"); DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); DataOutputStream out = new DataOutputStream(fstream1); BufferedWriter br1 = new BufferedWriter(new OutputStreamWriter(out)); try {
System.out.println("Line 1 : " + lin);
while ((line = br.readLine()) !=null) {
some condition checking
} catch (Exception e) {//Catch exception if any System.err.println("Error: " + e); e.printStackTrace();
}
} catch (Exception e) {//Catch exception if any System.err.println("Error: " + e); } finally{ continue; } }
ANY BODY CAN TELL WHAT IS THE EXACT DIFFERENCE BETWEEN ABSTRACT CLASS AND INTERFACE??? wHERE THESE ARE USE??WHERE NOT USED [ September 02, 2005: Message edited by: Barry Gaunt ]