java 关于file reading and token
发布网友
发布时间:2022-04-24 01:57
我来回答
共1个回答
热心网友
时间:2023-10-20 09:16
public static void readDataLine(PrintWriter prn,String dataLine){
dataLine=dataLine.replaceAll(","," ,");
String[] tokens=dataLine.split(",");
StringBuffer ss = new StringBuffer("<tr>");
int i = 0;
for(;i < tokens.length; i ++) {
String t = tokens[i];
ss.append("<td>").append( t == null? " " : t ).append("</td>");
}
for(; i < 12; i ++) { //每行12个
ss.append("<td> </td>");
}
ss.append("</tr>");
System.out.println(ss.toString());
System.out.println("<tr><td>"+tokens[0]+"</td><td>"+tokens[1]+"</td><td>"+tokens[2]+"</td><tr>");
}
热心网友
时间:2023-10-20 09:16
public static void readDataLine(PrintWriter prn,String dataLine){
dataLine=dataLine.replaceAll(","," ,");
String[] tokens=dataLine.split(",");
StringBuffer ss = new StringBuffer("<tr>");
int i = 0;
for(;i < tokens.length; i ++) {
String t = tokens[i];
ss.append("<td>").append( t == null? " " : t ).append("</td>");
}
for(; i < 12; i ++) { //每行12个
ss.append("<td> </td>");
}
ss.append("</tr>");
System.out.println(ss.toString());
System.out.println("<tr><td>"+tokens[0]+"</td><td>"+tokens[1]+"</td><td>"+tokens[2]+"</td><tr>");
}
热心网友
时间:2023-10-20 09:16
public static void readDataLine(PrintWriter prn,String dataLine){
dataLine=dataLine.replaceAll(","," ,");
String[] tokens=dataLine.split(",");
StringBuffer ss = new StringBuffer("<tr>");
int i = 0;
for(;i < tokens.length; i ++) {
String t = tokens[i];
ss.append("<td>").append( t == null? " " : t ).append("</td>");
}
for(; i < 12; i ++) { //每行12个
ss.append("<td> </td>");
}
ss.append("</tr>");
System.out.println(ss.toString());
System.out.println("<tr><td>"+tokens[0]+"</td><td>"+tokens[1]+"</td><td>"+tokens[2]+"</td><tr>");
}
热心网友
时间:2023-10-20 09:16
public static void readDataLine(PrintWriter prn,String dataLine){
dataLine=dataLine.replaceAll(","," ,");
String[] tokens=dataLine.split(",");
StringBuffer ss = new StringBuffer("<tr>");
int i = 0;
for(;i < tokens.length; i ++) {
String t = tokens[i];
ss.append("<td>").append( t == null? " " : t ).append("</td>");
}
for(; i < 12; i ++) { //每行12个
ss.append("<td> </td>");
}
ss.append("</tr>");
System.out.println(ss.toString());
System.out.println("<tr><td>"+tokens[0]+"</td><td>"+tokens[1]+"</td><td>"+tokens[2]+"</td><tr>");
}
热心网友
时间:2023-10-20 09:16
public static void readDataLine(PrintWriter prn,String dataLine){
dataLine=dataLine.replaceAll(","," ,");
String[] tokens=dataLine.split(",");
StringBuffer ss = new StringBuffer("<tr>");
int i = 0;
for(;i < tokens.length; i ++) {
String t = tokens[i];
ss.append("<td>").append( t == null? " " : t ).append("</td>");
}
for(; i < 12; i ++) { //每行12个
ss.append("<td> </td>");
}
ss.append("</tr>");
System.out.println(ss.toString());
System.out.println("<tr><td>"+tokens[0]+"</td><td>"+tokens[1]+"</td><td>"+tokens[2]+"</td><tr>");
}