<?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%2FBufferedInputStream</id>
		<title>Java/File Input Output/BufferedInputStream - История изменений</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%2FBufferedInputStream"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/File_Input_Output/BufferedInputStream&amp;action=history"/>
		<updated>2026-04-22T22:18:13Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java/File_Input_Output/BufferedInputStream&amp;diff=6151&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/BufferedInputStream&amp;diff=6151&amp;oldid=prev"/>
				<updated>2010-06-01T06:02:52Z</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/BufferedInputStream&amp;diff=6150&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/BufferedInputStream&amp;diff=6150&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;== Copy byte between BufferedInputStream and BufferedOutputStream ==&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.BufferedInputStream;&lt;br /&gt;
import java.io.BufferedOutputStream;&lt;br /&gt;
import java.io.FileInputStream;&lt;br /&gt;
import java.io.FileOutputStream;&lt;br /&gt;
class BufferedCopy {&lt;br /&gt;
  public static void main(String[] args) throws Exception {&lt;br /&gt;
    BufferedInputStream bis = null;&lt;br /&gt;
    BufferedOutputStream bos = null;&lt;br /&gt;
    FileInputStream fis = new FileInputStream(args[0]);&lt;br /&gt;
    bis = new BufferedInputStream(fis);&lt;br /&gt;
    FileOutputStream fos = new FileOutputStream(args[1]);&lt;br /&gt;
    bos = new BufferedOutputStream(fos);&lt;br /&gt;
    int byte_;&lt;br /&gt;
    while ((byte_ = bis.read()) != -1)&lt;br /&gt;
      bos.write(byte_);&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;
== Create BufferedInputStream from FileInputStream ==&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.BufferedInputStream;&lt;br /&gt;
import java.io.FileInputStream;&lt;br /&gt;
class BufferedInputStreamDemo {&lt;br /&gt;
  public static void main(String args[]) throws Exception {&lt;br /&gt;
    FileInputStream fis = new FileInputStream(args[0]);&lt;br /&gt;
    BufferedInputStream bis = new BufferedInputStream(fis);&lt;br /&gt;
    int i;&lt;br /&gt;
    while ((i = bis.read()) != -1) {&lt;br /&gt;
      System.out.println(i);&lt;br /&gt;
    }&lt;br /&gt;
    fis.close();&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;
== Import a file of exported preference data. ==&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.BufferedInputStream;&lt;br /&gt;
import java.io.FileInputStream;&lt;br /&gt;
import java.io.InputStream;&lt;br /&gt;
import java.util.prefs.Preferences;&lt;br /&gt;
public class Main {&lt;br /&gt;
  public static void main(String[] argv) throws Exception {&lt;br /&gt;
    // Create an input stream on a file&lt;br /&gt;
    InputStream is = new BufferedInputStream(new FileInputStream(&amp;quot;output.xml&amp;quot;));&lt;br /&gt;
    // Import preference data&lt;br /&gt;
    Preferences.importPreferences(is);&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;
== Read File in String Using Java BufferedInputStream Example ==&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.BufferedInputStream;&lt;br /&gt;
import java.io.File;&lt;br /&gt;
import java.io.FileInputStream;&lt;br /&gt;
public class Main {&lt;br /&gt;
  public static void main(String[] args) throws Exception {&lt;br /&gt;
    File file = new File(&amp;quot;C:/ReadFile.txt&amp;quot;);&lt;br /&gt;
    FileInputStream fin = new FileInputStream(file);&lt;br /&gt;
    BufferedInputStream bin = new BufferedInputStream(fin);&lt;br /&gt;
    byte[] contents = new byte[1024];&lt;br /&gt;
    int bytesRead = 0;&lt;br /&gt;
    String strFileContents;&lt;br /&gt;
    while ((bytesRead = bin.read(contents)) != -1) {&lt;br /&gt;
      strFileContents = new String(contents, 0, bytesRead);&lt;br /&gt;
      System.out.print(strFileContents);&lt;br /&gt;
    }&lt;br /&gt;
    bin.close();&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;
== Read File Using Java BufferedInputStream Example ==&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.BufferedInputStream;&lt;br /&gt;
import java.io.File;&lt;br /&gt;
import java.io.FileInputStream;&lt;br /&gt;
public class Main {&lt;br /&gt;
  public static void main(String[] args) throws Exception {&lt;br /&gt;
    File file = new File(&amp;quot;C:/ReadFile.txt&amp;quot;);&lt;br /&gt;
    FileInputStream fin = new FileInputStream(file);&lt;br /&gt;
    BufferedInputStream bin = new BufferedInputStream(fin);&lt;br /&gt;
    while (bin.available() &amp;gt; 0) {&lt;br /&gt;
      System.out.println((char) bin.read());&lt;br /&gt;
    }&lt;br /&gt;
    bin.close();&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;
== Read from file with BufferedInputStream ==&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.BufferedInputStream;&lt;br /&gt;
import java.io.FileInputStream;&lt;br /&gt;
public class Main {&lt;br /&gt;
  public static void main(String[] args) throws Exception {&lt;br /&gt;
    byte[] buffer = new byte[1024];&lt;br /&gt;
    BufferedInputStream bufferedInput = new BufferedInputStream(new FileInputStream(&amp;quot;filename.txt&amp;quot;));&lt;br /&gt;
    int bytesRead = 0;&lt;br /&gt;
    while ((bytesRead = bufferedInput.read(buffer)) != -1) {&lt;br /&gt;
      String chunk = new String(buffer, 0, bytesRead);&lt;br /&gt;
      System.out.print(chunk);&lt;br /&gt;
    }&lt;br /&gt;
    bufferedInput.close();&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;
== Use buffered streams to copy a 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;
import java.io.BufferedInputStream;&lt;br /&gt;
import java.io.BufferedOutputStream;&lt;br /&gt;
import java.io.FileInputStream;&lt;br /&gt;
import java.io.FileOutputStream;&lt;br /&gt;
public class Main {&lt;br /&gt;
  public static void main(String[] argv) throws Exception {&lt;br /&gt;
    BufferedInputStream fin = new BufferedInputStream(new FileInputStream(&amp;quot;in.dat&amp;quot;));&lt;br /&gt;
    BufferedOutputStream fout = new BufferedOutputStream(new FileOutputStream(&amp;quot;out.dat&amp;quot;));&lt;br /&gt;
    int i;&lt;br /&gt;
    do {&lt;br /&gt;
      i = fin.read();&lt;br /&gt;
      if (i != -1)&lt;br /&gt;
        fout.write(i);&lt;br /&gt;
    } while (i != -1);&lt;br /&gt;
    fin.close();&lt;br /&gt;
    fout.close();&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;/div&gt;</summary>
			</entry>

	</feed>