title: Incomplete copy of a text file
body: <p>This is my input file:</p>
  
  <pre><code>This is  a file test.
  please take
  notice of it.
  Peace.
  </code></pre>
  
  <p>and this is the output:</p>
  
  <pre><code>This is  a file test. 
  please take 
  notice of 
  </code></pre>
  
  <p>I do not understant why it stops and "it." ,but it displays the word "test.".
  Here's the code:</p>
  
  <pre><code>  import java.io.*;
    import java.util.*;
  
    public class FileTest {
  
  public static void readFile() throws Throwable {
      File _output = new File("output.txt");
      FileWriter _filewr = new FileWriter(_output);
      BufferedWriter _buffwrt = new BufferedWriter(_filewr);
      FileInputStream f = new FileInputStream(
              "C:\\Users\\Diana\\Desktop\\FileTest\\test.txt.txt");
      BufferedReader _buffer = new BufferedReader(new InputStreamReader(f));
      String _str = _buffer.readLine();
      while (_str != null) {
          String[] _vect = _str.split(" ");
          int i;
          for (i = 0; i &lt; _vect.length; i++) {
              if (_vect[i].contains(".")) {
                  _buffwrt.write(_vect[i] + " ");
                  break;
              }
  
              else
                  _buffwrt.write(_vect[i] + " ");
              _buffwrt.flush();
          }
          _str = _buffer.readLine();
  
      }
  
  }
  
  public static void main(String[] args) throws Throwable {
      readFile();
  }
  </code></pre>
  
  <p>}</p>