<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_Tutorial%2FFile%2FIntroduction</id>
		<title>Java Tutorial/File/Introduction - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_Tutorial%2FFile%2FIntroduction"/>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java_Tutorial/File/Introduction&amp;action=history"/>
		<updated>2026-04-10T10:55:51Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://jexp.ru/index.php?title=Java_Tutorial/File/Introduction&amp;diff=5392&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java_Tutorial/File/Introduction&amp;diff=5392&amp;oldid=prev"/>
				<updated>2010-06-01T05:20:15Z</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;Версия 05:20, 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://jexp.ru/index.php?title=Java_Tutorial/File/Introduction&amp;diff=5391&amp;oldid=prev</id>
		<title> в 17:44, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java_Tutorial/File/Introduction&amp;diff=5391&amp;oldid=prev"/>
				<updated>2010-05-31T17:44:27Z</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;==  Input Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are four types of streams: InputStream, OutputStream, Reader, and Writer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;Reader. A stream to read characters.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;Writer. A stream to write characters.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;InputStream. A stream to read binary data.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;OutputStream. A stream to write binary data.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For better performance, use the buffered I/O classes:&lt;br /&gt;
BufferedInputStream, &lt;br /&gt;
BufferedOutputStream, &lt;br /&gt;
BufferedReader, and &lt;br /&gt;
BufferedWriter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Reading from and writing to a stream dictate that you do so sequentially. &lt;br /&gt;
The java.io.RandomAccessFile is for non-sequential operations.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For object serialization and deserialization, you can use the ObjectInputStream and ObjectOutputStream classes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  OutputStream ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OutputStream class defines three write method overloads, which are mirrors of the read method overloads in InputStream:&amp;lt;/p&amp;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;
public void write (int b)&lt;br /&gt;
public void write (byte[] data)&lt;br /&gt;
public void write (byte[] data, int offset, int length)&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;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;The first overload writes the lowest 8 bits of the integer b to this OutputStream.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;The second writes the content of a byte array to this OutputStream.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;The third overload writes length bytes of the data starting at offset offset.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;close() method closes the OutputStream.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;flush() method forces any buffered content to be written out to the sink.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Reading Binary Data ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You use an InputStream to read binary data.&amp;lt;/p&amp;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;
InputStream&lt;br /&gt;
  |&lt;br /&gt;
  +-- FileInputStream &lt;br /&gt;
  |&lt;br /&gt;
  +-- BufferedInputStream&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;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;FileInputStream enables easy reading from a file.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;BufferedInputStream provides data buffering that improves performance.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;The ObjectInputStream class is used in object serialization.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Writing Binary Data ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The OutputStream abstract class represents a stream for writing binary data&amp;lt;/p&amp;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;
OutputStream&lt;br /&gt;
  |&lt;br /&gt;
  +--FileOutputStream&lt;br /&gt;
  |&lt;br /&gt;
  +--BufferedOutputStream. &lt;br /&gt;
  |&lt;br /&gt;
  +--ObjectOutputStream&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;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;FileOutputStream provides a convenient way to write to a file.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;BufferedOutputStream provides better performance.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;ObjectOutputStream class plays an important role in object serialization.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>