token parsing in java
<p>i have created a file with printStream object as shown below.</p>

<pre><code>PrintStream outPutOffice = new PrintStream(
   new BufferedOutputStream(new FileOutputStream(inDir+"/Office.txt")));
outPutOffice.print(fValue + (findx &lt; agtOffColCount ? "|" : ""));
</code></pre>

<p>now i have to read it content and sepeate it tokens with "|" as i have written token with "|" separted. i have write code as shown below it will read line correctly but not separate token with "|" character.</p>

<pre><code>BufferedReader inPutAgent = new BufferedReader(
   new InputStreamReader(new FileInputStream(inDir+"/Office.txt")));

String column=inPutAgent.readLine();
String []columnDetail = column.split("|");
</code></pre>

<p>columndetail array contains single character in each index instead i want single token in each index.
 so what is the problem.</p>

<p>thanks in advance</p>
