大写.xmlXML读取器
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了大写.xmlXML读取器相关的知识,希望对你有一定的参考价值。
Stores country name code and capital in an array and returns it. (not completed)
package xmlReader; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FilePermission; import java.io.FileReader; import java.io.IOException; import java.nio.file.Files; import java.util.StringTokenizer; public class CapitalsReader { String fileName; int quoteCount = 0; public CapitalsReader() { } CapitalsReader capitals_reader = new CapitalsReader(); capitals_reader.Read(); } { try { int lineNumber = 0; int tokenNumber = 0; while( (fileName = br.readLine()) != null) { lineNumber++; tokenNumber = 0; // skip second line if(lineNumber!=1) { while (stringTokenizer.hasMoreTokens()) { if(tokenNumber == 0 && lineNumber ==4) { } tokenNumber++; /* TO DO code to check for the tokens you want so you can insert the correct elements into the String [][] capitals. Use the fact that the country name begins after the first " and ends at the second, the country code runs from the fifth " to the 6th and the capital from the 15th " to the 16th. Once you've processed the capital, break ou of the while loop. */ //if() break; } lineNumber++; } } // TODO Auto-generated catch block e.printStackTrace(); // TODO Auto-generated catch block e.printStackTrace(); } finally { // do whatever you want here i.e. print something like "finished" } return capitals; } }
以上是关于大写.xmlXML读取器的主要内容,如果未能解决你的问题,请参考以下文章
solr分布式索引实战分片配置读取:工具类configUtil.java,读取配置代码片段,配置实例
GLSL:无法从 FBO 读取纹理并使用片段着色器渲染到另一个 FBO