我用printStream对象创建了一个文件,如下所示.
PrintStream outPutOffice = new PrintStream(
   new BufferedOutputStream(new FileOutputStream(inDir+"/Office.txt")));
outPutOffice.print(fValue + (findx < agtOffColCount ? "|" : ""));   
Run Code Online (Sandbox Code Playgroud)
现在我必须阅读它内容并用"|"分隔它们的标记 因为我用"|"写了标记 分离.我已经编写了如下所示的代码,它将正确读取行,但不能使用"|"单独标记 字符.
BufferedReader inPutAgent = new BufferedReader(
   new InputStreamReader(new FileInputStream(inDir+"/Office.txt")));
String column=inPutAgent.readLine();
String []columnDetail = column.split("|");
Run Code Online (Sandbox Code Playgroud)
columndetail数组在每个索引中包含单个字符,而我想在每个索引中使用单个标记.
问题是什么?
|   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           8706 次  |  
        
|   最近记录:  |