title: Tokenizing a String with tab delimiter in Java while skipping some tokens
body: <p>I have a huge file with data (~8Gb / ~80 Million records). Every record has 6-8 attributes which are split by a single tab. I would like for starters to copy some given attributes in another file. So I would like a more elegant code than the above, for example if I want only the second and the last token from a total of 4:</p>
  
  <pre><code>StringTokenizer st = new StringTokenizer(line, "\t");
  st.nextToken(); //get rid of the first token
  System.out.println(st.nextToken()); //show me the second token
  st.nextToken(); //get rid of the third token
  System.out.println(st.nextToken()); //show me the fourth token
  </code></pre>
  
  <p>I'm reminding that it's a huge file so I have to avoid any redundant if checks.</p>