<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://skillset.wiki/index.php?action=history&amp;feed=atom&amp;title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8</id>
	<title>スッキリわかる Java入門 実践編 - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://skillset.wiki/index.php?action=history&amp;feed=atom&amp;title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8"/>
	<link rel="alternate" type="text/html" href="https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;action=history"/>
	<updated>2026-05-13T13:41:19Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.5</generator>
	<entry>
		<id>https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;diff=624&amp;oldid=prev</id>
		<title>Y: /* 第２部：外部リソースへのアクセス */</title>
		<link rel="alternate" type="text/html" href="https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;diff=624&amp;oldid=prev"/>
		<updated>2019-02-21T02:03:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;第２部：外部リソースへのアクセス&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2019年2月21日 (木) 11:03時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l99&quot;&gt;99行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;99行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* バイト情報用：BufferedInputStream、BufferedOutputStream&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* バイト情報用：BufferedInputStream、BufferedOutputStream&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 少量のデータを何度も書き込み要求するよりも、データをひとまとまりにして１回で書き込んでしまった方が圧倒的に速く処理できる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 少量のデータを何度も書き込み要求するよりも、データをひとまとまりにして１回で書き込んでしまった方が圧倒的に速く処理できる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ファイルを読み書きするときは普通はバッファリングフィルタを併用する&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;ファイルを読み書きするときは普通はバッファリングフィルタを併用&#039;&#039;&#039;する&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* データフォーマット：データの保存形式や順序を定めたルール&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* データフォーマット：データの保存形式や順序を定めたルール&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ファイルフォーマット：ファイル内のデータ構造のルール&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* ファイルフォーマット：ファイル内のデータ構造のルール&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* メッセージフォーマット：ネットワーク経由で伝送されるデータ構造のルール&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* メッセージフォーマット：ネットワーク経由で伝送されるデータ構造のルール&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;CSV形式：複数のデータをカンマ区切りで格納するデータフォーマット&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;CSV形式&#039;&#039;&#039;：複数のデータをカンマ区切りで格納するデータフォーマット&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* CSV形式のデータを読み込むには Stringクラスの split()メソッドか、StringTokenizerクラスを利用&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* CSV形式のデータを読み込むには Stringクラスの split()メソッドか、StringTokenizerクラスを利用&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;プロパティファイル形式：CSV形式では力不足な場合に利用。キーと値のペアでデータを格納できる&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;プロパティファイル形式&#039;&#039;&#039;：CSV形式では力不足な場合に利用。キーと値のペアでデータを格納できる&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* プロパティファイル形式は直感的に意味が分かりやすいのでよく利用される&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* プロパティファイル形式は直感的に意味が分かりやすいのでよく利用される&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* プロパティファイル形式の場合、ファイル拡張子は「.properties」を利用する&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* プロパティファイル形式の場合、ファイル拡張子は「.properties」を利用する&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Y</name></author>
	</entry>
	<entry>
		<id>https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;diff=623&amp;oldid=prev</id>
		<title>Y: /* 第１部：Java の基本機能をより深く */</title>
		<link rel="alternate" type="text/html" href="https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;diff=623&amp;oldid=prev"/>
		<updated>2019-02-21T02:02:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;第１部：Java の基本機能をより深く&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;a href=&quot;https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;amp;diff=623&amp;amp;oldid=622&quot;&gt;差分を表示&lt;/a&gt;</summary>
		<author><name>Y</name></author>
	</entry>
	<entry>
		<id>https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;diff=622&amp;oldid=prev</id>
		<title>Y: /* 第２部：外部リソースへのアクセス */</title>
		<link rel="alternate" type="text/html" href="https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;diff=622&amp;oldid=prev"/>
		<updated>2019-02-21T01:56:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;第２部：外部リソースへのアクセス&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2019年2月21日 (木) 10:56時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l76&quot;&gt;76行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;76行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==第２部：外部リソースへのアクセス==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==第２部：外部リソースへのアクセス==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;プログラムがファイルにアクセスする方法：ランダムアクセス or シーケンシャルアクセス&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;プログラムがファイルにアクセスする方法：ランダムアクセス or シーケンシャルアクセス&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;大量のデータを高速で扱えるシーケンシャルアクセスの方がファイル操作の基本的な手法&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;大量のデータを高速で扱えるシーケンシャルアクセスの方がファイル操作の基本的な手法&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ファイルに書き込むには、java.ioパッケージの FileWriterクラスがよく利用される&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;ファイルに書き込むには、java.ioパッケージの FileWriterクラスがよく利用される&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ファイルの読み書きを高速にするためにデータは一旦「バッファ」に溜めておかれる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;ファイルの読み書きを高速にするためにデータは一旦「バッファ」に溜めておかれる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;「バッファ」という仕組みがないと、データ書き込みのたびにハードディスクのヘッダが動くことになる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;「バッファ」という仕組みがないと、データ書き込みのたびにハードディスクのヘッダが動くことになる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;flush()メソッドを呼び出すことによって強制的にデータ書き込みを JVM に指示できる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;flush()メソッドを呼び出すことによって強制的にデータ書き込みを JVM に指示できる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;read() によりファイルから１文字を読み込む際、char型ではなく int型として返される&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;read() によりファイルから１文字を読み込む際、char型ではなく int型として返される&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;これは、ファイルの最後まで読み込んだことが -1 によって報告されるため&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;これは、ファイルの最後まで読み込んだことが -1 によって報告されるため&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;データを利用するときは char型にキャストして利用する&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;データを利用するときは char型にキャストして利用する&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;バイナリファイルは少ないデータ容量で済む、高速に処理できるなどの理由から転送や保存に利用される&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;バイナリファイルは少ないデータ容量で済む、高速に処理できるなどの理由から転送や保存に利用される&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;全く同じ文字でも、どの文字コード体系を利用するかによってバイト列としての表現は全く異なってしまう&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;全く同じ文字でも、どの文字コード体系を利用するかによってバイト列としての表現は全く異なってしまう&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ファイルを開いた後に閉じ忘れると致命的な不具合につながるので、ファイルを開いたら必ず閉じる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;ファイルを開いた後に閉じ忘れると致命的な不具合につながるので、ファイルを開いたら必ず閉じる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;try 直後のカッコ内でファイルオープンやデータベース接続をすると勝手に後片ずけをしてくれる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;try 直後のカッコ内でファイルオープンやデータベース接続をすると勝手に後片ずけをしてくれる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;JVM が利用する外の世界のデータは「実際に読み込んでみないとそもそもサイズは分からない」&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;JVM が利用する外の世界のデータは「実際に読み込んでみないとそもそもサイズは分からない」&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ゆえに、外部データはシーケンシャルに少しずつ処理するのが JVM の基本的なアプローチ（ストリーム）&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;ゆえに、外部データはシーケンシャルに少しずつ処理するのが JVM の基本的なアプローチ（ストリーム）&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;通常ストリームは JVM 外部のデータを少しずつ読み書きする際に利用するが、JVM 内部のデータ読み書きにも応用することができる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;通常ストリームは JVM 外部のデータを少しずつ読み書きする際に利用するが、JVM 内部のデータ読み書きにも応用することができる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;フィルタ：ストリームの途中に様々な変換処理をする部品（インスタンス）を挟むことが可能&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;フィルタ：ストリームの途中に様々な変換処理をする部品（インスタンス）を挟むことが可能&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;例えば、本来はとても複雑な処理である「データの暗号化」も CipherOutputStreamフィルタを１つ挟むだけで簡単に実現できる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;例えば、本来はとても複雑な処理である「データの暗号化」も CipherOutputStreamフィルタを１つ挟むだけで簡単に実現できる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;フィルタはあくまでもストリームに付加的に接続される道具。ゆえに、フィルタ単独で new はできない&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;フィルタはあくまでもストリームに付加的に接続される道具。ゆえに、フィルタ単独で new はできない&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;利用頻度が高い java.ioパッケージのバッファリングフィルタ。データをバッファに溜めてくれる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;利用頻度が高い java.ioパッケージのバッファリングフィルタ。データをバッファに溜めてくれる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;文字情報用：BufferedReader、BufferedWriter&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;文字情報用：BufferedReader、BufferedWriter&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;バイト情報用：BufferedInputStream、BufferedOutputStream&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;バイト情報用：BufferedInputStream、BufferedOutputStream&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;少量のデータを何度も書き込み要求するよりも、データをひとまとまりにして１回で書き込んでしまった方が圧倒的に速く処理できる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;少量のデータを何度も書き込み要求するよりも、データをひとまとまりにして１回で書き込んでしまった方が圧倒的に速く処理できる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ファイルを読み書きするときは普通はバッファリングフィルタを併用する&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;ファイルを読み書きするときは普通はバッファリングフィルタを併用する&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;データフォーマット：データの保存形式や順序を定めたルール&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;データフォーマット：データの保存形式や順序を定めたルール&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ファイルフォーマット：ファイル内のデータ構造のルール&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;ファイルフォーマット：ファイル内のデータ構造のルール&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;メッセージフォーマット：ネットワーク経由で伝送されるデータ構造のルール&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;メッセージフォーマット：ネットワーク経由で伝送されるデータ構造のルール&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CSV形式：複数のデータをカンマ区切りで格納するデータフォーマット&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;CSV形式：複数のデータをカンマ区切りで格納するデータフォーマット&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CSV形式のデータを読み込むには Stringクラスの split()メソッドか、StringTokenizerクラスを利用&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;CSV形式のデータを読み込むには Stringクラスの split()メソッドか、StringTokenizerクラスを利用&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;プロパティファイル形式：CSV形式では力不足な場合に利用。キーと値のペアでデータを格納できる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;プロパティファイル形式：CSV形式では力不足な場合に利用。キーと値のペアでデータを格納できる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;プロパティファイル形式は直感的に意味が分かりやすいのでよく利用される&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;プロパティファイル形式は直感的に意味が分かりやすいのでよく利用される&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;プロパティファイル形式の場合、ファイル拡張子は「.properties」を利用する&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;プロパティファイル形式の場合、ファイル拡張子は「.properties」を利用する&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;プロパティファイル形式の読み書きには java.utilパッケージの Propertiesクラスが利用される&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;プロパティファイル形式の読み書きには java.utilパッケージの Propertiesクラスが利用される&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Propertiesクラスは全てのデータを文字列として扱う。ゆえに、整数や boolean型は明示的に型変換する必要がある&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;Propertiesクラスは全てのデータを文字列として扱う。ゆえに、整数や boolean型は明示的に型変換する必要がある&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;勇者データと一緒に勇者の武器データも一緒に保存したいなど、ネストしたデータ構造を利用したい場合は XML形式がオススメ&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;勇者データと一緒に勇者の武器データも一緒に保存したいなど、ネストしたデータ構造を利用したい場合は XML形式がオススメ&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;XML形式を扱うには JAXP が利用できる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;XML形式を扱うには JAXP が利用できる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;XML形式よりも読みやすいデータ形式としては最近 JSON形式がよく利用される&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;XML形式よりも読みやすいデータ形式としては最近 JSON形式がよく利用される&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;オブジェクトの直列化：インスタンスの全フィールド情報をとにかく楽に保存したい場合に利用できる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;オブジェクトの直列化：インスタンスの全フィールド情報をとにかく楽に保存したい場合に利用できる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;複雑なデータ構造を持つインスタンス内の全データを 0 と 1 の単純な羅列に並ばせることから「直列化」と呼ばれる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;複雑なデータ構造を持つインスタンス内の全データを 0 と 1 の単純な羅列に並ばせることから「直列化」と呼ばれる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;インスタンスを直列化で保存できるようにするためには java.io.Serializable を実装する必要がある&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;インスタンスを直列化で保存できるようにするためには java.io.Serializable を実装する必要がある&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;直列化するインスタンスが仮にクラス型のフィールドを持っていたとしても、そのクラス型が Serializable を実装していたら連鎖的にその has-a インスタンスも直列化で保存される&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;直列化するインスタンスが仮にクラス型のフィールドを持っていたとしても、そのクラス型が Serializable を実装していたら連鎖的にその has-a インスタンスも直列化で保存される&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Serializable を実装して直列化保存に対応した場合、仕様変更後の復元を予防するためにシリアルバージョンUIDを宣言しておく&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;Serializable を実装して直列化保存に対応した場合、仕様変更後の復元を予防するためにシリアルバージョンUIDを宣言しておく&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;java.net 高水準API：簡単に使えるが細かい操作はできない（ざっくり URL を指定するなど）&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;java.net 高水準API：簡単に使えるが細かい操作はできない（ざっくり URL を指定するなど）&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;java.net 低水準API：細かい操作ができるが複雑で手間がかかる（ポートやソケットを指定するなど）&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;java.net 低水準API：細かい操作ができるが複雑で手間がかかる（ポートやソケットを指定するなど）&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;リアルタイムの対戦ゲームなどを作るには低水準API を利用することになる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;リアルタイムの対戦ゲームなどを作るには低水準API を利用することになる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;java.net.Socketクラスを利用することで TCP/IP接続をコントロールできる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;java.net.Socketクラスを利用することで TCP/IP接続をコントロールできる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;接続後のデータ書式や通信手順は、上位のプロトコルの形式を利用する&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;接続後のデータ書式や通信手順は、上位のプロトコルの形式を利用する&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;複数の相手から同時に接続を受け付けるような本格的なサーバプログラムの開発には、別途スレッドやセキュリティなどについて学習する必要がある&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;複数の相手から同時に接続を受け付けるような本格的なサーバプログラムの開発には、別途スレッドやセキュリティなどについて学習する必要がある&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;より大量のデータを効率的かつ安全、高速に保存、検索するためにはデータベースを利用する&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;より大量のデータを効率的かつ安全、高速に保存、検索するためにはデータベースを利用する&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;データベースを使うと、複雑なデータ検索や書き込みも簡単に行える&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;データベースを使うと、複雑なデータ検索や書き込みも簡単に行える&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Javaプログラムの中で複雑なデータ処理を記述する必要がなくなる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;Javaプログラムの中で複雑なデータ処理を記述する必要がなくなる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;データベースシステムで実現されている、専門家による長年の研究に基づいた様々な手法やアイディアを利用できる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;データベースシステムで実現されている、専門家による長年の研究に基づいた様々な手法やアイディアを利用できる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Java で独自に開発するファイルを使った処理よりもデータベースを使った処理の方が圧倒的に高速で安全&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;Java で独自に開発するファイルを使った処理よりもデータベースを使った処理の方が圧倒的に高速で安全&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;更新系SQL文では「executeUpdate()」を利用。検索系SQL文では「executeQuery()」を利用&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;更新系SQL文では「executeUpdate()」を利用。検索系SQL文では「executeQuery()」を利用&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;変更されるパラメータがある場合は PreparedStatementクラスを利用して、SQL文の雛形を準備する&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;変更されるパラメータがある場合は PreparedStatementクラスを利用して、SQL文の雛形を準備する&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SQL文の結果データは ResultSetオブジェクトとして返ってくる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;SQL文の結果データは ResultSetオブジェクトとして返ってくる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;next() は最終行で false を返す&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;next() は最終行で false を返す&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;基本的には while で回しながら next() でカーソルを進めて、getInt、getString でデータを取得する&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;基本的には while で回しながら next() でカーソルを進めて、getInt、getString でデータを取得する&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;２行以上（複数行）の結果表が返される可能性がある場合、while (rs.next()) を利用&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;２行以上（複数行）の結果表が返される可能性がある場合、while (rs.next()) を利用&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;０行か１行の結果表が返される可能性がある場合、if (rs.next()) を利用&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;０行か１行の結果表が返される可能性がある場合、if (rs.next()) を利用&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;JDBC を使えば、複数のSLQ要求も単一トランザクションとして送信できる&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;JDBC を使えば、複数のSLQ要求も単一トランザクションとして送信できる&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==第３部：効率的な開発==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==第３部：効率的な開発==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Y</name></author>
	</entry>
	<entry>
		<id>https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;diff=621&amp;oldid=prev</id>
		<title>Y: /* 第１部：Java の基本機能をより深く */</title>
		<link rel="alternate" type="text/html" href="https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;diff=621&amp;oldid=prev"/>
		<updated>2019-02-21T01:55:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;第１部：Java の基本機能をより深く&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;a href=&quot;https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;amp;diff=621&amp;amp;oldid=599&quot;&gt;差分を表示&lt;/a&gt;</summary>
		<author><name>Y</name></author>
	</entry>
	<entry>
		<id>https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;diff=599&amp;oldid=prev</id>
		<title>Y: ページの作成:「==第１部：Java の基本機能をより深く== * プロジェクトなど本格的な開発現場では、便利で高機能な Java の機能を組み合わせて…」</title>
		<link rel="alternate" type="text/html" href="https://skillset.wiki/index.php?title=%E3%82%B9%E3%83%83%E3%82%AD%E3%83%AA%E3%82%8F%E3%81%8B%E3%82%8B_Java%E5%85%A5%E9%96%80_%E5%AE%9F%E8%B7%B5%E7%B7%A8&amp;diff=599&amp;oldid=prev"/>
		<updated>2019-02-21T00:31:51Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「==第１部：Java の基本機能をより深く== * プロジェクトなど本格的な開発現場では、便利で高機能な Java の機能を組み合わせて…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==第１部：Java の基本機能をより深く==&lt;br /&gt;
* プロジェクトなど本格的な開発現場では、便利で高機能な Java の機能を組み合わせて効率的に開発を進めます&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;文字列操作の多くは、Stringクラス&amp;#039;&amp;#039;&amp;#039;に備わっているメソッドを利用することで簡単に実現できます&lt;br /&gt;
* ただし、スレッドを利用している時に Stringクラスを利用すると不具合につながる恐れがある&lt;br /&gt;
* StringBuilder で利用する時のように、自身への参照を返すメソッドを連続して呼び出す方法をメソッドチェーンと呼ぶ&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Javaコレクションフレームワーク&amp;#039;&amp;#039;&amp;#039;：様々なデータ構造に対応した「データを格納するための入れ物」クラス&lt;br /&gt;
* Listインターフェース（重複OK・順序保証あり）：ArrayList、LinkedList。格納するデータの型を＜＞で指定（ジェネリクス）&lt;br /&gt;
Setインターフェース（重複NG・順序保証なし）：HashSet、LinkedHashSet、TreeSet&lt;br /&gt;
Mapインターフェース（ペアの値）：HashMap、LinkedHashMap、TreeMap&lt;br /&gt;
配列の方がメモリ効率や性能は高いが、自動的に要素が増える ArrayList の方が多く使われる&lt;br /&gt;
コレクションフレームワークは基本データ型を格納できない。オートボクシング機能が助かる&lt;br /&gt;
必要な場面もあるので、for文・拡張for文・イテレータ。リストから要素を取り出すこの３種類の方法はすべて利用できるようにしておく&lt;br /&gt;
コレクションインスタンスは十把一絡げで取り扱う。これがメリットの大きい一般的なやり方。List&amp;lt;String&amp;gt; = new ArrayList&amp;lt;String&amp;gt;(); など&lt;br /&gt;
HashSet内のデータを取り出す場合の順序は基本的に不明。しかし、LinkedHashSet（格納した順序）や TreeSet（辞書順）を使えば順序で取り出せる&lt;br /&gt;
自分が開発したクラスをコレクションで利用する場合、equals() や hashCode() を正しくオーバーライドしていないとコレクションは正しく動かない&lt;br /&gt;
利用すべきコレクションクラスの選び方は『実践』p107 を参照&lt;br /&gt;
基盤５メソッド：Objectクラスが持っている（全てのクラスが継承する）機能が５つある&lt;br /&gt;
toString（文字列表現を得る）、equals（等価判定をする）、hashCode（ハッシュ値を得る）、compareTo（大小関係を判定する）、clone（複製する）&lt;br /&gt;
toStringメソッド：インスタンスの情報を文字列で示す。クラスを作ったら適切にオーバーライドすべき&lt;br /&gt;
equalsメソッド：２つのインスタンスを比較して等価（内容が同じ）であるかどうかを判定する。等値（メモリアドレス完全に一致している）かの判定ではない。クラスを作ったら必ず適切にオーバーライドすべき&lt;br /&gt;
JVM は ArrayList から同じものを探すために equlasメソッドを利用するため&lt;br /&gt;
さらに、Hash系のコレクションクラスでは等価判定にハッシュ値を利用するので hashCodeメソッドも正しくオーバーライドしておく必要がある&lt;br /&gt;
JVM はまずはハッシュ値によって「だいたい同じか？」を判定し、ハッシュ値が一致した時に限り equalsメソッドによる厳密な判定へと移る&lt;br /&gt;
開発するクラスが自然順序（銀行口座番号など）を持っているなら Comparableインターフェースを実装すると後々便利&lt;br /&gt;
インスタンスの完全コピーに対応したクラスを作りたい場合は Cloneableインターフェースを実装して、さらに cloneメソッドをオーバーライドする&lt;br /&gt;
インスタンスの複製には深いコピー（deep copy）と浅いコピー（shallow copy）がある&lt;br /&gt;
Java はデータの型を厳格にチェックするので安全に開発を進めることができる&lt;br /&gt;
「型安全」は、変数に予期しない種類のデータが入ってしまうことを未然に防ぐための安全装置（リスクヘッジ）&lt;br /&gt;
ゆえに、型を厳格に扱わないプログラミング言語は「便利だが少し怖い」というイメージが正しい&lt;br /&gt;
型を積極的に活用することにより、データをより厳密に扱うことができて不具合を減らせる&lt;br /&gt;
コンパイルエラーは重大事故を未然に防ぐ安全装置。型安全を活用して、どんどんコンパイラにミスを探させよう！&lt;br /&gt;
Java には型安全のメリットをフル活用するために「ジェネリクス」や「列挙型」という仕組みが用意されている&lt;br /&gt;
ジェネリクスという特別な仕組みによって定義されている標準クラスは＜＞記法が可能。APIリファレンスでも &amp;lt;E&amp;gt; や &amp;lt;K,V&amp;gt; と表記されている&lt;br /&gt;
ジェネリクスは自作クラスでも活用できる。ジェネリクスとはクラス作成時に型を確定できないときに「仮の型」で代用しておく方法&lt;br /&gt;
ジェネリクスが定義されたクラスでは、クラス利用時にその時に都合の良い「型」を指定することができる&lt;br /&gt;
型を「仮決め」しているおかげでダウンキャストというリスクをとる必要がなくなっている&lt;br /&gt;
ちなみに、ジェネリクスでは指定できる型を予め制限することもできる。public class Pocket&amp;lt;E extends Character&amp;gt; など&lt;br /&gt;
Java では、指定した種類の値だけを入れることができる「列挙型」というものを定義できる&lt;br /&gt;
列挙型では、その変数で許される具体的な型をカンマ区切りで列挙して宣言できる。enum AccountType { FUTSU, TOUZA, TEIKI; }&lt;br /&gt;
どのようなものを第１級オブジェクトとして扱えるかは、そのプログラミング言語の便利さや開発効率を決定づける&lt;br /&gt;
例えば、C言語はインスタンスを第１級オブジェクトとして扱えないためオブジェクト指向プログラミングは困難&lt;br /&gt;
Java8以降では、データ、データ構造、インスタンスに加えてファンクション（関数）を第１級オブジェクトとして扱うことができる&lt;br /&gt;
ファンクションとは「Input → Process → Output構造の処理ロジックの部分」のこと。ファンクション名はなくても構わない&lt;br /&gt;
ゆえに、メソッドもクラスのためのファンクションの一種と言えるがメソッド（動作）には名称がつく&lt;br /&gt;
Java では、IntBinaryOperator func = Main::sub; のように、Mainクラスの subメソッドを変数 func に割り当てることができる&lt;br /&gt;
もちろん、これもメソッドが格納されているメモリアドレスを参照する参照型&lt;br /&gt;
Java8以降では、処理ロジックを事前に何らかのクラス内のメソッドとしてわざわざ定義しなくても、随時、生成して利用することができる&lt;br /&gt;
このように、簡易的に（わざわざクラスを作らないで）メソッドを利用したい場合に使うのが「ラムダ式」と呼ばれる記法&lt;br /&gt;
ラムダ式を使うと、ファンクションをその場で生み出して、変数に割り当てたり呼び出したりできる&lt;br /&gt;
ラムダ式では条件が許せば、様々な省略した書き方をすることができる&lt;br /&gt;
引数が１つの場合は、型・括弧・return を省略できる。例 ↓&lt;br /&gt;
IntToDoubleFunction func = (int x) -&amp;gt; { return x * x * 3.14; };&lt;br /&gt;
IntToDoubleFunction func = x -&amp;gt; x * x * 3.14;&lt;br /&gt;
ラムダ式では、その時点でコードに記述されている変数全てを利用できるが書き換えることはできない&lt;br /&gt;
関数オブジェクトやラムダ式は、他の機能（配列やコレクションなど）と組み合わせて使うことによって真価を発揮する。詳細は『実践』p189&lt;br /&gt;
streamメソッドとラムダ式を組み合わせて使うことによって、各要素に様々な一括処理を行ったり集計を取ったりエレガントな一括処理ができる&lt;br /&gt;
for (Integer i : list1) { System.out.println(i * 2); }。これが・・&lt;br /&gt;
list1.stream().forEach(i -&amp;gt; System.out.println(i * 2)); となる&lt;br /&gt;
さらにマルチコアCPU環境において、streamメソッドの代わりに parallelStreamメソッドを使うと JVM は並列処理を行うようになり２倍処理スピードがアップする&lt;br /&gt;
JVM は天才たちが作った仮想マシン環境なので、内部は非常に複雑な構造をしている&lt;br /&gt;
Java では、Java開発者が JVM自体の内部機構にアクセスして、その情報を取得したり利用したりできる&lt;br /&gt;
例えば、Javaのバージョン、インストール先、動作OS、メモリの状態、実行ユーザ名などの情報を取得できたり、OS内の他のプログラムを呼び出したりできる&lt;br /&gt;
「Write once, Run anywhere」も１００％ではない。例えば、改行コード１つ取っても Linux環境と Mac環境では画面表示が異なってしまう&lt;br /&gt;
そこで、あらゆる動作OSを想定した上で適切な改行コードを出力するように「line.separator」システムプロパティを使う必要があったりする&lt;br /&gt;
リフレクションAPI を利用すると、クラスやインターフェースに関する様々な情報を JVM に調べさせることができる。今まで実現不可能だったことも可能になる。例えば ↓&lt;br /&gt;
FQCN、クラス名部分のみ、所属パッケージ名、親クラス名、配列かどうか、インターフェースかどうか、列挙型かどうか、など&lt;br /&gt;
本格的な開発においては、標準・非標準の様々な API を組み合わせて開発していくケースも多&lt;br /&gt;
例えば、「ログイン機能を実装するための１４個のクラスファイル」や「暗号処理を実現する３１個のクラスファイル」のように、複数のクラスファイルをまとめて利用する場合がほとんど&lt;br /&gt;
ライブラリ：他の人に利用してもらうことを想定した複数のクラスファイルの集まりのこと。通常は JARファイル形式で提供される&lt;br /&gt;
非標準ライブラリの中にはとても便利なものも多い。例えば、EqualsBuilder には正しい equlasメソッドのオーバーライドが既に実装されている&lt;br /&gt;
ログ出力を簡単に行ったり、コレクションを簡単に使うためのクラス群も充実していたりする&lt;br /&gt;
ログ出力には何らかの非標準ライブラリを利用することが一般的&lt;br /&gt;
ただし、非標準ライブラリを利用する際にはライセンスに気をつける必要がある。オープンソース、プロプライエタリなど&lt;br /&gt;
ライセンス違反にならないかどうかは自分で判断しない。リーダーや上司、法務部門に判断してもらう&lt;br /&gt;
「GPLに感染する」＝「ソースコードを嫌でも開示しないといけない」＝コピーレフト（リチャード・ストールマン）&lt;br /&gt;
&lt;br /&gt;
==第２部：外部リソースへのアクセス==&lt;br /&gt;
プログラムがファイルにアクセスする方法：ランダムアクセス or シーケンシャルアクセス&lt;br /&gt;
大量のデータを高速で扱えるシーケンシャルアクセスの方がファイル操作の基本的な手法&lt;br /&gt;
ファイルに書き込むには、java.ioパッケージの FileWriterクラスがよく利用される&lt;br /&gt;
ファイルの読み書きを高速にするためにデータは一旦「バッファ」に溜めておかれる&lt;br /&gt;
「バッファ」という仕組みがないと、データ書き込みのたびにハードディスクのヘッダが動くことになる&lt;br /&gt;
flush()メソッドを呼び出すことによって強制的にデータ書き込みを JVM に指示できる&lt;br /&gt;
read() によりファイルから１文字を読み込む際、char型ではなく int型として返される&lt;br /&gt;
これは、ファイルの最後まで読み込んだことが -1 によって報告されるため&lt;br /&gt;
データを利用するときは char型にキャストして利用する&lt;br /&gt;
バイナリファイルは少ないデータ容量で済む、高速に処理できるなどの理由から転送や保存に利用される&lt;br /&gt;
全く同じ文字でも、どの文字コード体系を利用するかによってバイト列としての表現は全く異なってしまう&lt;br /&gt;
ファイルを開いた後に閉じ忘れると致命的な不具合につながるので、ファイルを開いたら必ず閉じる&lt;br /&gt;
try 直後のカッコ内でファイルオープンやデータベース接続をすると勝手に後片ずけをしてくれる&lt;br /&gt;
JVM が利用する外の世界のデータは「実際に読み込んでみないとそもそもサイズは分からない」&lt;br /&gt;
ゆえに、外部データはシーケンシャルに少しずつ処理するのが JVM の基本的なアプローチ（ストリーム）&lt;br /&gt;
通常ストリームは JVM 外部のデータを少しずつ読み書きする際に利用するが、JVM 内部のデータ読み書きにも応用することができる&lt;br /&gt;
フィルタ：ストリームの途中に様々な変換処理をする部品（インスタンス）を挟むことが可能&lt;br /&gt;
例えば、本来はとても複雑な処理である「データの暗号化」も CipherOutputStreamフィルタを１つ挟むだけで簡単に実現できる&lt;br /&gt;
フィルタはあくまでもストリームに付加的に接続される道具。ゆえに、フィルタ単独で new はできない&lt;br /&gt;
利用頻度が高い java.ioパッケージのバッファリングフィルタ。データをバッファに溜めてくれる&lt;br /&gt;
文字情報用：BufferedReader、BufferedWriter&lt;br /&gt;
バイト情報用：BufferedInputStream、BufferedOutputStream&lt;br /&gt;
少量のデータを何度も書き込み要求するよりも、データをひとまとまりにして１回で書き込んでしまった方が圧倒的に速く処理できる&lt;br /&gt;
ファイルを読み書きするときは普通はバッファリングフィルタを併用する&lt;br /&gt;
データフォーマット：データの保存形式や順序を定めたルール&lt;br /&gt;
ファイルフォーマット：ファイル内のデータ構造のルール&lt;br /&gt;
メッセージフォーマット：ネットワーク経由で伝送されるデータ構造のルール&lt;br /&gt;
CSV形式：複数のデータをカンマ区切りで格納するデータフォーマット&lt;br /&gt;
CSV形式のデータを読み込むには Stringクラスの split()メソッドか、StringTokenizerクラスを利用&lt;br /&gt;
プロパティファイル形式：CSV形式では力不足な場合に利用。キーと値のペアでデータを格納できる&lt;br /&gt;
プロパティファイル形式は直感的に意味が分かりやすいのでよく利用される&lt;br /&gt;
プロパティファイル形式の場合、ファイル拡張子は「.properties」を利用する&lt;br /&gt;
プロパティファイル形式の読み書きには java.utilパッケージの Propertiesクラスが利用される&lt;br /&gt;
Propertiesクラスは全てのデータを文字列として扱う。ゆえに、整数や boolean型は明示的に型変換する必要がある&lt;br /&gt;
勇者データと一緒に勇者の武器データも一緒に保存したいなど、ネストしたデータ構造を利用したい場合は XML形式がオススメ&lt;br /&gt;
XML形式を扱うには JAXP が利用できる&lt;br /&gt;
XML形式よりも読みやすいデータ形式としては最近 JSON形式がよく利用される&lt;br /&gt;
オブジェクトの直列化：インスタンスの全フィールド情報をとにかく楽に保存したい場合に利用できる&lt;br /&gt;
複雑なデータ構造を持つインスタンス内の全データを 0 と 1 の単純な羅列に並ばせることから「直列化」と呼ばれる&lt;br /&gt;
インスタンスを直列化で保存できるようにするためには java.io.Serializable を実装する必要がある&lt;br /&gt;
直列化するインスタンスが仮にクラス型のフィールドを持っていたとしても、そのクラス型が Serializable を実装していたら連鎖的にその has-a インスタンスも直列化で保存される&lt;br /&gt;
Serializable を実装して直列化保存に対応した場合、仕様変更後の復元を予防するためにシリアルバージョンUIDを宣言しておく&lt;br /&gt;
java.net 高水準API：簡単に使えるが細かい操作はできない（ざっくり URL を指定するなど）&lt;br /&gt;
java.net 低水準API：細かい操作ができるが複雑で手間がかかる（ポートやソケットを指定するなど）&lt;br /&gt;
リアルタイムの対戦ゲームなどを作るには低水準API を利用することになる&lt;br /&gt;
java.net.Socketクラスを利用することで TCP/IP接続をコントロールできる&lt;br /&gt;
接続後のデータ書式や通信手順は、上位のプロトコルの形式を利用する&lt;br /&gt;
複数の相手から同時に接続を受け付けるような本格的なサーバプログラムの開発には、別途スレッドやセキュリティなどについて学習する必要がある&lt;br /&gt;
より大量のデータを効率的かつ安全、高速に保存、検索するためにはデータベースを利用する&lt;br /&gt;
データベースを使うと、複雑なデータ検索や書き込みも簡単に行える&lt;br /&gt;
Javaプログラムの中で複雑なデータ処理を記述する必要がなくなる&lt;br /&gt;
データベースシステムで実現されている、専門家による長年の研究に基づいた様々な手法やアイディアを利用できる&lt;br /&gt;
Java で独自に開発するファイルを使った処理よりもデータベースを使った処理の方が圧倒的に高速で安全&lt;br /&gt;
更新系SQL文では「executeUpdate()」を利用。検索系SQL文では「executeQuery()」を利用&lt;br /&gt;
変更されるパラメータがある場合は PreparedStatementクラスを利用して、SQL文の雛形を準備する&lt;br /&gt;
SQL文の結果データは ResultSetオブジェクトとして返ってくる&lt;br /&gt;
next() は最終行で false を返す&lt;br /&gt;
基本的には while で回しながら next() でカーソルを進めて、getInt、getString でデータを取得する&lt;br /&gt;
２行以上（複数行）の結果表が返される可能性がある場合、while (rs.next()) を利用&lt;br /&gt;
０行か１行の結果表が返される可能性がある場合、if (rs.next()) を利用&lt;br /&gt;
JDBC を使えば、複数のSLQ要求も単一トランザクションとして送信できる&lt;br /&gt;
&lt;br /&gt;
==第３部：効率的な開発==&lt;/div&gt;</summary>
		<author><name>Y</name></author>
	</entry>
</feed>