<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FFile_Input_Output%2FBuffered_Reader_Writer</id>
		<title>Java/File Input Output/Buffered Reader Writer - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FFile_Input_Output%2FBuffered_Reader_Writer"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/File_Input_Output/Buffered_Reader_Writer&amp;action=history"/>
		<updated>2026-04-21T18:46:31Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java/File_Input_Output/Buffered_Reader_Writer&amp;diff=6139&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/File_Input_Output/Buffered_Reader_Writer&amp;diff=6139&amp;oldid=prev"/>
				<updated>2010-06-01T06:02:45Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 06:02, 1 июня 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java/File_Input_Output/Buffered_Reader_Writer&amp;diff=6138&amp;oldid=prev</id>
		<title> в 18:01, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/File_Input_Output/Buffered_Reader_Writer&amp;diff=6138&amp;oldid=prev"/>
				<updated>2010-05-31T18:01:43Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Creates a tiny text editor with BufferedReader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
class TinyEdit {&lt;br /&gt;
  public static void main(String args[]) throws IOException {&lt;br /&gt;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));&lt;br /&gt;
    String str[] = new String[100];&lt;br /&gt;
    System.out.println(&amp;quot;Enter lines of text.&amp;quot;);&lt;br /&gt;
    System.out.println(&amp;quot;Enter &amp;quot;stop&amp;quot; to quit.&amp;quot;);&lt;br /&gt;
    for (int i = 0; i &amp;lt; 100; i++) {&lt;br /&gt;
      str[i] = br.readLine();&lt;br /&gt;
      if (str[i].equals(&amp;quot;stop&amp;quot;))&lt;br /&gt;
        break;&lt;br /&gt;
    }&lt;br /&gt;
    System.out.println(&amp;quot;\nHere is your file:&amp;quot;);&lt;br /&gt;
    for (int i = 0; i &amp;lt; 100; i++) {&lt;br /&gt;
      if (str[i].equals(&amp;quot;stop&amp;quot;))&lt;br /&gt;
        break;&lt;br /&gt;
      System.out.println(str[i]);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== how to read lines from a file and print these to the standard output stream ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.FileReader;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
class FileReaderDemo {&lt;br /&gt;
  public static void main(String args[]) throws IOException {&lt;br /&gt;
    FileReader fr = new FileReader(&amp;quot;FileReaderDemo.java&amp;quot;);&lt;br /&gt;
    BufferedReader br = new BufferedReader(fr);&lt;br /&gt;
    String s;&lt;br /&gt;
    while ((s = br.readLine()) != null) {&lt;br /&gt;
      System.out.println(s);&lt;br /&gt;
    }&lt;br /&gt;
    fr.close();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Read a string from console using a BufferedReader. ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
class BRReadLines {&lt;br /&gt;
  public static void main(String args[]) throws IOException {&lt;br /&gt;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));&lt;br /&gt;
    String str;&lt;br /&gt;
    System.out.println(&amp;quot;Enter lines of text.&amp;quot;);&lt;br /&gt;
    System.out.println(&amp;quot;Enter &amp;quot;stop&amp;quot; to quit.&amp;quot;);&lt;br /&gt;
    do {&lt;br /&gt;
      str = br.readLine();&lt;br /&gt;
      System.out.println(str);&lt;br /&gt;
    } while (!str.equals(&amp;quot;stop&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use a BufferedReader to read characters from the console. ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
class BRRead {&lt;br /&gt;
  public static void main(String args[]) throws IOException {&lt;br /&gt;
    char c;&lt;br /&gt;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));&lt;br /&gt;
    System.out.println(&amp;quot;Enter characters, &amp;quot;q&amp;quot; to quit.&amp;quot;);&lt;br /&gt;
    do {&lt;br /&gt;
      c = (char) br.read();&lt;br /&gt;
      System.out.println(c);&lt;br /&gt;
    } while (c != &amp;quot;q&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Writing to a Text File ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedWriter;&lt;br /&gt;
import java.io.File;&lt;br /&gt;
import java.io.FileWriter;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.PrintWriter;&lt;br /&gt;
public class WriteFile {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Product[] movies = new Product[10];&lt;br /&gt;
    movies[0] = new Product(&amp;quot;L&amp;quot;, 1946, 14.95);&lt;br /&gt;
    movies[1] = new Product(&amp;quot;T&amp;quot;, 1965, 12.95);&lt;br /&gt;
    movies[2] = new Product(&amp;quot;Y&amp;quot;, 1974, 16.95);&lt;br /&gt;
    movies[3] = new Product(&amp;quot;T&amp;quot;, 1975, 11.95);&lt;br /&gt;
    movies[4] = new Product(&amp;quot;S&amp;quot;, 1977, 17.95);&lt;br /&gt;
    movies[5] = new Product(&amp;quot;B&amp;quot;, 1987, 16.95);&lt;br /&gt;
    movies[6] = new Product(&amp;quot;G&amp;quot;, 1989, 14.95);&lt;br /&gt;
    movies[7] = new Product(&amp;quot;A&amp;quot;, 1995, 19.95);&lt;br /&gt;
    movies[8] = new Product(&amp;quot;G&amp;quot;, 1997, 14.95);&lt;br /&gt;
    movies[9] = new Product(&amp;quot;R&amp;quot;, 2001, 19.95);&lt;br /&gt;
    PrintWriter out = openWriter(&amp;quot;movies.txt&amp;quot;);&lt;br /&gt;
    for (Product m : movies)&lt;br /&gt;
      writeMovie(m, out);&lt;br /&gt;
    out.close();&lt;br /&gt;
  }&lt;br /&gt;
  private static PrintWriter openWriter(String name) {&lt;br /&gt;
    try {&lt;br /&gt;
      File file = new File(name);&lt;br /&gt;
      PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file)), true);&lt;br /&gt;
      return out;&lt;br /&gt;
    } catch (IOException e) {&lt;br /&gt;
      System.out.println(&amp;quot;I/O Error&amp;quot;);&lt;br /&gt;
      System.exit(0);&lt;br /&gt;
    }&lt;br /&gt;
    return null;&lt;br /&gt;
  }&lt;br /&gt;
  private static void writeMovie(Product m, PrintWriter out) {&lt;br /&gt;
    String line = m.title;&lt;br /&gt;
    line += &amp;quot;\t&amp;quot; + Integer.toString(m.year);&lt;br /&gt;
    line += &amp;quot;\t&amp;quot; + Double.toString(m.price);&lt;br /&gt;
    out.println(line);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
class Product {&lt;br /&gt;
  public String title;&lt;br /&gt;
  public int year;&lt;br /&gt;
  public double price;&lt;br /&gt;
  public Product(String title, int year, double price) {&lt;br /&gt;
    this.title = title;&lt;br /&gt;
    this.year = year;&lt;br /&gt;
    this.price = price;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>