<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://commons.oreilly.com/wiki/skins/common/feed.css?97"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>QuickTime for Java: A Developer's Notebook/Working with Components - Revision history</title>
		<link>http://commons.oreilly.com/wiki/index.php?title=QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.11.0</generator>
		<lastBuildDate>Thu, 23 May 2013 00:55:23 GMT</lastBuildDate>
		<item>
			<title>Newacct at 01:16, 29 January 2010</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components&amp;diff=26122&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 01:16, 29 January 2010&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; import quicktime.util.QTUtils;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; import quicktime.util.QTUtils;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; public class FourCharCodeTest &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;extends Object &lt;/del&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; public class FourCharCodeTest {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   public static void main (String[  ] args) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   public static void main (String[  ] args) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 118:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 118:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; import com.oreilly.qtjnotebook.ch01.QTSessionCheck;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; import com.oreilly.qtjnotebook.ch01.QTSessionCheck;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; public class SimpleMovieExport &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;extends Object &lt;/del&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; public class SimpleMovieExport {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   public static final void main (String[  ] args) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   public static final void main (String[  ] args) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 379:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 379:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; import com.oreilly.qtjnotebook.ch01.QTSessionCheck;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; import com.oreilly.qtjnotebook.ch01.QTSessionCheck;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; public class GraphicImportExport &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;extends Object &lt;/del&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; public class GraphicImportExport {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   Button exportButton;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   Button exportButton;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Fri, 29 Jan 2010 01:16:32 GMT</pubDate>			<dc:creator>Newacct</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components</comments>		</item>
		<item>
			<title>Docbook2Wiki: Initial conversion from Docbook</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components&amp;diff=7239&amp;oldid=prev</link>
			<description>&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:22, 7 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</description>
			<pubDate>Fri, 07 Mar 2008 13:22:47 GMT</pubDate>			<dc:creator>Docbook2Wiki</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components</comments>		</item>
		<item>
			<title>Docbook2Wiki: Initial conversion from Docbook</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components&amp;diff=7160&amp;oldid=prev</link>
			<description>&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:17, 7 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</description>
			<pubDate>Fri, 07 Mar 2008 13:17:34 GMT</pubDate>			<dc:creator>Docbook2Wiki</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components</comments>		</item>
		<item>
			<title>Evanlenz: 1 revision(s)</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components&amp;diff=4461&amp;oldid=prev</link>
			<description>&lt;p&gt;1 revision(s)&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 00:25, 7 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</description>
			<pubDate>Fri, 07 Mar 2008 00:25:57 GMT</pubDate>			<dc:creator>Evanlenz</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components</comments>		</item>
		<item>
			<title>Docbook2Wiki: Initial conversion from Docbook</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components&amp;diff=4460&amp;oldid=prev</link>
			<description>&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 00:17, 7 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-1. Bit-wise, hex, and character representation of a FOUR_CHAR_CODE'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-1. Bit-wise, hex, and character representation of a FOUR_CHAR_CODE'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developer's &lt;/del&gt;Notebook_I_4_tt57.png|Bit-wise, hex, and character representation of a FOUR_CHAR_CODE]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developers &lt;/ins&gt;Notebook_I_4_tt57.png|Bit-wise, hex, and character representation of a FOUR_CHAR_CODE]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 200:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 200:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-2. Choice dialog with canned MovieExporter types'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-2. Choice dialog with canned MovieExporter types'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developer's &lt;/del&gt;Notebook_I_4_tt58.png|Choice dialog with canned MovieExporter types]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developers &lt;/ins&gt;Notebook_I_4_tt58.png|Choice dialog with canned MovieExporter types]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 208:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 208:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-3. MPEG-4 export dialog'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-3. MPEG-4 export dialog'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developer's &lt;/del&gt;Notebook_I_4_tt59.png|MPEG-4 export dialog]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developers &lt;/ins&gt;Notebook_I_4_tt59.png|MPEG-4 export dialog]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 245:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 245:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-4. Audio non-options for MPEG-4 export on Windows'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-4. Audio non-options for MPEG-4 export on Windows'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developer's &lt;/del&gt;Notebook_I_4_tt60.png|Audio non-options for MPEG-4 export on Windows]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developers &lt;/ins&gt;Notebook_I_4_tt60.png|Audio non-options for MPEG-4 export on Windows]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 293:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 293:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-5. Discovered Movie Exporters'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-5. Discovered Movie Exporters'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developer's &lt;/del&gt;Notebook_I_4_tt63.png|Discovered Movie Exporters]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developers &lt;/ins&gt;Notebook_I_4_tt63.png|Discovered Movie Exporters]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 504:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 504:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-6. Selecting a GraphicsExporter'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 4-6. Selecting a GraphicsExporter'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developer's &lt;/del&gt;Notebook_I_4_tt65.png|Selecting a GraphicsExporter]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:QuickTime for Java: A &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Developers &lt;/ins&gt;Notebook_I_4_tt65.png|Selecting a GraphicsExporter]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:4309:newid:4460 --&gt;
&lt;/table&gt;</description>
			<pubDate>Fri, 07 Mar 2008 00:17:35 GMT</pubDate>			<dc:creator>Docbook2Wiki</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components</comments>		</item>
		<item>
			<title>Evanlenz: 1 revision(s)</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components&amp;diff=4309&amp;oldid=prev</link>
			<description>&lt;p&gt;1 revision(s)&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 00:16, 7 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</description>
			<pubDate>Fri, 07 Mar 2008 00:16:19 GMT</pubDate>			<dc:creator>Evanlenz</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components</comments>		</item>
		<item>
			<title>Docbook2Wiki: Initial conversion from Docbook</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components&amp;diff=4308&amp;oldid=prev</link>
			<description>&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 00:15, 7 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</description>
			<pubDate>Fri, 07 Mar 2008 00:15:32 GMT</pubDate>			<dc:creator>Docbook2Wiki</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components</comments>		</item>
		<item>
			<title>Evanlenz: 1 revision(s)</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components&amp;diff=4157&amp;oldid=prev</link>
			<description>&lt;p&gt;1 revision(s)&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:57, 6 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</description>
			<pubDate>Thu, 06 Mar 2008 23:57:56 GMT</pubDate>			<dc:creator>Evanlenz</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components</comments>		</item>
		<item>
			<title>Docbook2Wiki: Initial conversion from Docbook</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components&amp;diff=4156&amp;oldid=prev</link>
			<description>&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{QuickTime for Java: A Developer's Notebook/TOC}}&lt;br /&gt;
When QuickTime came out in 1990, it could play movies the size of a postage stamp—barely—on $7,000 hardware. It used audio and video codecs that, although still supported today, have long since been abandoned by users. Yet it's been a smooth transition from Apple Video to Cinepak to MPEG-4. This is thanks to an extraordinarily modular design—most of the heavy lifting in QuickTime is performed by ''components'' , or shared code fragments that can be discovered and used dynamically. Components provide support for importing and exporting image and movie formats, performing image and sound compression and decompression, accessing system resources, and much more. The QuickTime installer provides components for many features, and components added later by the end user, from either Apple or third parties, can provide more functionality, like support for more media formats.&lt;br /&gt;
&lt;br /&gt;
Components aren't always front-and-center in the API—after all, the first few chapters have managed to avoid mentioning them entirely. QuickTime has been assumed to just &amp;quot;do the right thing&amp;quot; when it comes to opening files and turning them into movies, decompressing and rendering the data, saving it to disk, etc. When needed, QuickTime looks through its catalog of components for required functionality and gets what it needs.&lt;br /&gt;
&lt;br /&gt;
But sometimes it's desirable or necessary for the developer to work with components more directly, to figure out what's available or to specify behavior. Figuring out what tools are available at runtime can be a powerful asset.&lt;br /&gt;
&lt;br /&gt;
== Specifying a Component's Type ==&lt;br /&gt;
&lt;br /&gt;
In QuickTime, components are identified by a ''type'' and a ''subtype'' . The type specifies a broad area of functionality, while the subtype is a specific implementation of that functionality. For example, there's a &amp;quot;movie exporter&amp;quot; type, which identifies components that can write a movie into a non-QuickTime format, with subtypes identifying the exporters for AVI, MPEG-4, etc.&lt;br /&gt;
&lt;br /&gt;
These identifiers are 32-bit &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt; values, but typically they're not enumerated constants like you might expect from Java. Usually, the 32 bits are read as four 8-bit ASCII characters, making a short, human-readable name. These are defined in the native API as &amp;lt;tt&amp;gt;OSType&amp;lt;/tt&amp;gt;s, but when populated with meaningful values, they're called &amp;quot;four character codes,&amp;quot; from the native &amp;lt;tt&amp;gt;FOUR_CHAR_CODE&amp;lt;/tt&amp;gt; function that returns an &amp;lt;tt&amp;gt;OSType&amp;lt;/tt&amp;gt; for a string. This often is abbreviated as FCC, or 4CC.&lt;br /&gt;
&lt;br /&gt;
The scheme makes a lot of sense from the C programmer's point of view. For example, defining the 4CC for a movie requires a nice, simple one-liner, as seen in the native &amp;lt;tt&amp;gt;Movies.h&amp;lt;/tt&amp;gt; header file:&lt;br /&gt;
&lt;br /&gt;
 MovieResourceType = ''''moov''''&lt;br /&gt;
          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''moov&amp;quot; shows up a lot in QuickTime: as an identifier for a movie's copy-and-paste type, as its Carbon file type, as the top-level &amp;quot;atom&amp;quot; in the file format, etc. Say it out loud if you don't get the joke: moo-vee''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It turns out that dealing with 4CCs is harder in Java, thanks to Java's more modern approach to text. Specifically, the use of Unicode means Java characters are 2 bytes each, which means help is needed to turn a Java string into a 4CC.&lt;br /&gt;
&lt;br /&gt;
=== How do I do that? ===&lt;br /&gt;
&lt;br /&gt;
Fortunately, the &amp;lt;tt&amp;gt;QTUtils&amp;lt;/tt&amp;gt; class provides two methods for converting to and from 4CCs: &amp;lt;tt&amp;gt;toOSType()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;fromOSType( )&amp;lt;/tt&amp;gt;. [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-EX-1|Example 4-1]] exercises these methods by converting a Java string to and from its 4CC representation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''Compile and run this example from the downloaded book code with ant run-ch04-fourcharcodetest''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-EX-1&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 4-1. Converting to and from FOUR_CHAR_CODEs'''&lt;br /&gt;
&lt;br /&gt;
 package com.oreilly.qtjnotebook.ch04;&lt;br /&gt;
  &lt;br /&gt;
 import quicktime.util.QTUtils;&lt;br /&gt;
  &lt;br /&gt;
 public class FourCharCodeTest extends Object {&lt;br /&gt;
  &lt;br /&gt;
   public static void main (String[  ] args) {&lt;br /&gt;
       if (args.length &amp;lt; 1) {&lt;br /&gt;
           System.out.println (&amp;quot;Usage: FourCharCodeTest &amp;lt;fcc&amp;gt;&amp;quot;);&lt;br /&gt;
           return;&lt;br /&gt;
       }&lt;br /&gt;
       System.out.println (args[0]);&lt;br /&gt;
       int fcc = QTUtils.toOSType (args[0]);&lt;br /&gt;
       System.out.println (fcc);&lt;br /&gt;
       System.out.println (Integer.toHexString (fcc));&lt;br /&gt;
       String fccString = QTUtils.fromOSType(fcc);&lt;br /&gt;
       System.out.println (fccString);&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;main( )&amp;lt;/tt&amp;gt; method takes a &amp;lt;tt&amp;gt;String&amp;lt;/tt&amp;gt; from the command line, converts it to a 4CC, prints that value in decimal and hex, then converts it back to a &amp;lt;tt&amp;gt;String&amp;lt;/tt&amp;gt;. When it's run with &amp;lt;tt&amp;gt;moov&amp;lt;/tt&amp;gt; as an argument, the output looks like this:&lt;br /&gt;
&lt;br /&gt;
 cadamson% java -classpath classes &lt;br /&gt;
   com.oreilly.qtjnotebook.ch04.FourCharCodeTest moov&lt;br /&gt;
 moov&lt;br /&gt;
 1836019574&lt;br /&gt;
 6d6f6f76&lt;br /&gt;
 moov&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''Really hard-core QuickTime developers can read 4CCs in hex without thinking about it. Drop a movie file on a hex editor and you'll probably see 6d6f6f76 (moov) as bytes 4-8''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What just happened? ===&lt;br /&gt;
&lt;br /&gt;
These utility methods provide some good, old-fashioned bit-munging to do their conversions. &amp;lt;tt&amp;gt;toOSType( )&amp;lt;/tt&amp;gt; takes a &amp;lt;tt&amp;gt;String&amp;lt;/tt&amp;gt; as its argument, grabbing the low 8 bits of each character and putting them in the proper place in the returned &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;. In other words, the bottom 8 bits of the first character take up the first 8 bits of the &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;, then the next character is used for the next 8 bits, and so on. [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-FIG-1|Figure 4-1]] shows where the bits end up in the bit-shifted &amp;quot;&amp;lt;tt&amp;gt;moov&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-FIG-1&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-1. Bit-wise, hex, and character representation of a FOUR_CHAR_CODE'''&lt;br /&gt;
&lt;br /&gt;
[[Image:QuickTime for Java: A Developer's Notebook_I_4_tt57.png|Bit-wise, hex, and character representation of a FOUR_CHAR_CODE]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fromOSType( )&amp;lt;/tt&amp;gt; does the opposite conversion, masking off the bits of an &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt; and returning a four-character Java string.&lt;br /&gt;
&lt;br /&gt;
== Exporting Movies ==&lt;br /&gt;
&lt;br /&gt;
One of the most obviously useful components is the &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt;, which you can use to convert a QuickTime movie into a non-QuickTime format, such as AVI or MPEG-4.&lt;br /&gt;
&lt;br /&gt;
=== How do I do that? ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;quicktime.std.qtcomponents.MovieExporter&amp;lt;/tt&amp;gt; class provides a convenient Java wrapper around movie exporter components. It requires that you pass it a subtype indicating which exporter you want—i.e., which format you want to export to. [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-EX-2|Example 4-2]] shows how a &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt; can be created and used from a canned list of subtypes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''Compile and run this example with ant run-ch04-simplemovieexport''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-EX-2&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 4-2. Simple MovieExporter creation and use'''&lt;br /&gt;
&lt;br /&gt;
 package com.oreilly.qtjnotebook.ch04;&lt;br /&gt;
  &lt;br /&gt;
 import quicktime.*;&lt;br /&gt;
 import quicktime.std.*;&lt;br /&gt;
 import quicktime.std.movies.*;&lt;br /&gt;
 import quicktime.io.*;&lt;br /&gt;
 import quicktime.std.qtcomponents.*;&lt;br /&gt;
 import quicktime.utils.QTUtils;&lt;br /&gt;
  &lt;br /&gt;
 import java.awt.*;&lt;br /&gt;
 import javax.swing.*;&lt;br /&gt;
  &lt;br /&gt;
 import com.oreilly.qtjnotebook.ch01.QTSessionCheck;&lt;br /&gt;
  &lt;br /&gt;
 public class SimpleMovieExport extends Object {&lt;br /&gt;
  &lt;br /&gt;
   public static final void main (String[  ] args) {&lt;br /&gt;
       new SimpleMovieExport( );&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
   public SimpleMovieExport( ) {&lt;br /&gt;
       // build choices&lt;br /&gt;
       ExportChoice[  ] choices = new ExportChoice[3];&lt;br /&gt;
       choices[0] =&lt;br /&gt;
           new ExportChoice (&amp;quot;QuickTime Movie&amp;quot;,&lt;br /&gt;
                             StdQTConstants.kQTFileTypeMovie);&lt;br /&gt;
       choices[1] =&lt;br /&gt;
           new ExportChoice (&amp;quot;AVI file&amp;quot;,&lt;br /&gt;
                             StdQTConstants.kQTFileTypeAVI);&lt;br /&gt;
       choices[2] =&lt;br /&gt;
           new ExportChoice (&amp;quot;MPEG-4 file&amp;quot;, &lt;br /&gt;
                             QTUtils.toOSType(&amp;quot;mpg4&amp;quot;));&lt;br /&gt;
  &lt;br /&gt;
       try {&lt;br /&gt;
           // query user for a movie to open&lt;br /&gt;
           QTSessionCheck.check( );&lt;br /&gt;
           QTFile file =&lt;br /&gt;
               QTFile.standardGetFilePreview (QTFile.kStandardQTFileTypes);&lt;br /&gt;
           OpenMovieFile omFile = OpenMovieFile.asRead (file);&lt;br /&gt;
           Movie movie = Movie.fromFile (omFile);&lt;br /&gt;
  &lt;br /&gt;
           // offer a choice of movie exporters&lt;br /&gt;
           JComboBox exportCombo = new JComboBox (choices);&lt;br /&gt;
           JOptionPane.showMessageDialog (null,&lt;br /&gt;
                                          exportCombo,&lt;br /&gt;
                                          &amp;quot;Choose exporter&amp;quot;,&lt;br /&gt;
                                          JOptionPane.PLAIN_MESSAGE);&lt;br /&gt;
           ExportChoice choice = &lt;br /&gt;
               (ExportChoice) exportCombo.getSelectedItem( );&lt;br /&gt;
  &lt;br /&gt;
           // create an exporter&lt;br /&gt;
           MovieExporter exporter =&lt;br /&gt;
               new MovieExporter (choice.subtype);&lt;br /&gt;
  &lt;br /&gt;
           QTFile saveFile = &lt;br /&gt;
               new QTFile (new java.io.File(&amp;quot;Untitled&amp;quot;));&lt;br /&gt;
  &lt;br /&gt;
           // do the export&lt;br /&gt;
           movie.setProgressProc( );&lt;br /&gt;
           movie.convertToFile (null,&lt;br /&gt;
                                saveFile,&lt;br /&gt;
                                StdQTConstants.kQTFileTypeMovie,&lt;br /&gt;
                                StdQTConstants.kMoviePlayer,&lt;br /&gt;
                                IOConstants.smSystemScript,&lt;br /&gt;
                                StdQTConstants.showUserSettingsDialog |&lt;br /&gt;
                                StdQTConstants.movieToFileOnlyExport |&lt;br /&gt;
                                StdQTConstants.movieFileSpecValid,&lt;br /&gt;
                                exporter);&lt;br /&gt;
  &lt;br /&gt;
           // need to explicitly quit (since awt is running)&lt;br /&gt;
           System.exit(0);&lt;br /&gt;
       } catch (QTException qte) {&lt;br /&gt;
           qte.printStackTrace( );&lt;br /&gt;
       }&lt;br /&gt;
       &lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
   public class ExportChoice {&lt;br /&gt;
       String name;&lt;br /&gt;
       int subtype;&lt;br /&gt;
       public ExportChoice (String n, int st) {&lt;br /&gt;
           name = n;&lt;br /&gt;
           subtype = st;&lt;br /&gt;
       }&lt;br /&gt;
       public String toString( ) {&lt;br /&gt;
           return name;&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When run, this program prompts the user to open a movie file. Once the movie loads, the program offers a dialog with a choice of formats to export to, as shown in [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-FIG-2|Figure 4-2]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-FIG-2&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-2. Choice dialog with canned MovieExporter types'''&lt;br /&gt;
&lt;br /&gt;
[[Image:QuickTime for Java: A Developer's Notebook_I_4_tt58.png|Choice dialog with canned MovieExporter types]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, it shows the user a save dialog detailing the proposed export (e.g., &amp;quot;Movie to MPEG-4&amp;quot;) and an Options button. The button brings up a dialog specific to the export format. For example, the AVI export dialog is fairly simple, offering only a few settings to choose from. On the other hand, the MPEG-4 export dialog, seen in [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-FIG-3|Figure 4-3]], is extraordinarily busy, packed with descriptions of the many options to help end users understand their choices and potentially keep their exported file compliant with MPEG-4 standards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-FIG-3&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-3. MPEG-4 export dialog'''&lt;br /&gt;
&lt;br /&gt;
[[Image:QuickTime for Java: A Developer's Notebook_I_4_tt59.png|MPEG-4 export dialog]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the user makes his choices and clicks OK, the long export process begins. Because movie export is very computationally intensive—potentially every frame of video and every audio sample must be re-encoded—a progress dialog appears, so the user can see how much of the export has completed and how much longer it will take.&lt;br /&gt;
&lt;br /&gt;
=== What just happened? ===&lt;br /&gt;
&lt;br /&gt;
This program uses an inner class called &amp;lt;tt&amp;gt;ExportType&amp;lt;/tt&amp;gt; to wrap a subtype, &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;, and a &amp;lt;tt&amp;gt;String&amp;lt;/tt&amp;gt;, largely for the purpose of simplifying the &amp;lt;tt&amp;gt;JComboBox&amp;lt;/tt&amp;gt; used in the format-choice dialog. These subtypes come from constants defined in the &amp;lt;tt&amp;gt;StdQTConstants&amp;lt;/tt&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
Once a choice is made, the program instantiates a &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt; by passing the subtype to its constructor. Next, it requests a progress dialog by calling &amp;lt;tt&amp;gt;setProgressProc()&amp;lt;/tt&amp;gt; on the movie.&lt;br /&gt;
&lt;br /&gt;
Finally, the export is performed by calling &amp;lt;tt&amp;gt;convertToFile()&amp;lt;/tt&amp;gt; and passing in the exporter. This method takes several parameters:&lt;br /&gt;
&lt;br /&gt;
* A &amp;lt;tt&amp;gt;Track&amp;lt;/tt&amp;gt; to indicate that only this track should be exported, or &amp;lt;tt&amp;gt;null&amp;lt;/tt&amp;gt; for all tracks.&lt;br /&gt;
* A &amp;lt;tt&amp;gt;QTFile&amp;lt;/tt&amp;gt; to export to.&lt;br /&gt;
* A file type, such as &amp;lt;tt&amp;gt;StdQTConstants.kQTFileTypeMovie&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* A creator, such as &amp;lt;tt&amp;gt;StdQTConstants.kMoviePlayer&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* A script tag, typically &amp;lt;tt&amp;gt;IOConstants.smSystemScript&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Behavior flags. This example uses all three of the valid values: &amp;lt;tt&amp;gt;showUserSettingsDialog&amp;lt;/tt&amp;gt; makes the export bring up the Save As dialog that includes the filename and the options button; &amp;lt;tt&amp;gt;movieToFileOnlyExport&amp;lt;/tt&amp;gt; limits the export choices to formats supported by the exporter component; and &amp;lt;tt&amp;gt;movieFileSpecValid&amp;lt;/tt&amp;gt; asserts that the &amp;lt;tt&amp;gt;QTFile&amp;lt;/tt&amp;gt; is valid and should be used as the default name in the dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''Including showUserSettingsDialog allows you to pick up the settings and the save-as GUIs in one call, instead of having to show separate dialogs for each. Too bad flags like this aren't described in Javadoc''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt; to use for the export.&lt;br /&gt;
&lt;br /&gt;
=== What about... ===&lt;br /&gt;
&lt;br /&gt;
...using the &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt; itself to do the export? That's an alternative. The exporter's &amp;lt;tt&amp;gt;toFile()&amp;lt;/tt&amp;gt; exports the movie to a file, and its &amp;lt;tt&amp;gt;toHandle( )&amp;lt;/tt&amp;gt; exports to memory. This also has the advantage of being able to export just part of a movie, as specified by the &amp;lt;tt&amp;gt;startTime&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;duration&amp;lt;/tt&amp;gt; arguments. Note that doing this requires a different program flow, because first you'd need to get a valid &amp;lt;tt&amp;gt;QTFile&amp;lt;/tt&amp;gt; (perhaps with an AWT file dialog) and then you'd need to call the exporter's &amp;lt;tt&amp;gt;doUserDialog( )&amp;lt;/tt&amp;gt; to configure the export. Also the &amp;lt;tt&amp;gt;Movie&amp;lt;/tt&amp;gt; class's &amp;lt;tt&amp;gt;convertToFile( )&amp;lt;/tt&amp;gt; method can be more convenient, because, as seen here, it allows use of the default progress dialog. When using the &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt; methods, there's no access to the default dialog. In that case, the only alternative is to provide a custom progress dialog and handle progress callbacks with &amp;lt;tt&amp;gt;setProgressProc( )&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Also, a complaint: I tried exporting to MPEG-4 on Windows and didn't get any audio options. When I click the Audio Track menu in the Exporter dialog, I get the useless panel as shown in [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-FIG-4|Figure 4-4]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-FIG-4&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-4. Audio non-options for MPEG-4 export on Windows'''&lt;br /&gt;
&lt;br /&gt;
[[Image:QuickTime for Java: A Developer's Notebook_I_4_tt60.png|Audio non-options for MPEG-4 export on Windows]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is not a technical issue but a legal one. Apple has licensed MPEG-4 audio encoding for its Mac-based QuickTime users, but not for Windows users. The codecs exist, but apparently you have to contact Dolby about license terms to enable them for Windows.&lt;br /&gt;
&lt;br /&gt;
== Exporting Movies to Any Installed Format ==&lt;br /&gt;
&lt;br /&gt;
Exporting to a list of known formats is limiting—if the end user has installed new movie exporters, either from third parties or via an update to QuickTime itself, a program that uses a canned list of exporters won't be able to pick them up. Fortunately, QuickTime provides a means of querying for installed components of a given type. You can use this strategy to offer a list of all available exporters.&lt;br /&gt;
&lt;br /&gt;
=== How do I do that? ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;AdvancedMovieExport&amp;lt;/tt&amp;gt; eliminates the three canned entries in the &amp;lt;tt&amp;gt;choices&amp;lt;/tt&amp;gt; array that were used by &amp;lt;tt&amp;gt;SimpleMovieExport&amp;lt;/tt&amp;gt; (shown in [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-EX-2|Example 4-2]]) and instead builds the array through a process of discovery; this code would replace the short &amp;quot;build choices&amp;quot; block in the constructor for &amp;lt;tt&amp;gt;SimpleMovieExport&amp;lt;/tt&amp;gt; but needs to go inside the try-catch, because it makes calls that can throw &amp;lt;tt&amp;gt;QTException&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 Vector choices = new Vector( );&lt;br /&gt;
 ComponentIdentifier ci = null;&lt;br /&gt;
 ComponentDescription cd =&lt;br /&gt;
   new ComponentDescription(StdQTConstants.movieExportType);&lt;br /&gt;
 while ( (ci = ComponentIdentifier.find(ci, cd)) != null) {&lt;br /&gt;
   // check to see that the movie can be exported&lt;br /&gt;
   // with this component (this throws some obnoxious&lt;br /&gt;
   // exceptions, maybe a bit expensive?)&lt;br /&gt;
   try {&lt;br /&gt;
       MovieExporter exporter = new MovieExporter (ci);&lt;br /&gt;
       if (exporter.validate (movie, null)) {&lt;br /&gt;
           ExportChoice choice =&lt;br /&gt;
               new ExportChoice (ci.getInfo( ).getName( ),&lt;br /&gt;
                                 ci);&lt;br /&gt;
           choices.addElement(choice);&lt;br /&gt;
       }&lt;br /&gt;
   } catch (StdQTException expE) {&lt;br /&gt;
       System.out.println (&amp;quot;** can't validate &amp;quot; +&lt;br /&gt;
                           ci.getInfo( ).getName( ) + &amp;quot; **&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''Run this example with ant run-ch04-advancedmovieexport''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       // expE.printStackTrace( );&lt;br /&gt;
   } // ow!&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
When run, the list of supported exporters is surprisingly large, as seen in [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-FIG-5|Figure 4-5]]. In this case, a &amp;quot;normal&amp;quot; movie, consisting of a video track and an audio track, is being exported, meaning that any audio-only format (Wave, AIFF, etc.) or audio/video format (QuickTime, AVI, MPEG-4, etc.) will work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-FIG-5&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-5. Discovered Movie Exporters'''&lt;br /&gt;
&lt;br /&gt;
[[Image:QuickTime for Java: A Developer's Notebook_I_4_tt63.png|Discovered Movie Exporters]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''Hinted Movie, the format selected in Figure 4-5, is a QuickTime movie with &amp;quot;hints&amp;quot; to optimize streaming''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also should take note of the discovered exporters that cannot export the movie. These are logged to standard out:&lt;br /&gt;
&lt;br /&gt;
 run-ch04-advancedmovieexport:&lt;br /&gt;
    [java] ** can't validate BMP **&lt;br /&gt;
    [java] ** can't validate Standard MIDI **&lt;br /&gt;
    [java] ** can't validate Picture **&lt;br /&gt;
    [java] ** can't validate Text **&lt;br /&gt;
    [java] ** can't validate QuickTime TeXML **&lt;br /&gt;
    [java] ** can't validate QuickTime Media Link **&lt;br /&gt;
&lt;br /&gt;
These fail because the source movie doesn't contain tracks that can be exported to these formats. With a source movie with different kinds of tracks, some of these would succeed and others would fail.&lt;br /&gt;
&lt;br /&gt;
=== What just happened? ===&lt;br /&gt;
&lt;br /&gt;
The process of discovering components by subtype is rather peculiar. It hinges on making repeated calls to a &amp;quot;find&amp;quot; method, passing in the last matching component. Doing this requires a &amp;lt;tt&amp;gt;ComponentDescription&amp;lt;/tt&amp;gt; , used as a template to match against, and a &amp;lt;tt&amp;gt;ComponentIdentifier&amp;lt;/tt&amp;gt;, which refers to a specific component (though not a specific instance of that component). To find movie exporters, initialize a &amp;lt;tt&amp;gt;ComponentDescription&amp;lt;/tt&amp;gt; template with the constant &amp;lt;tt&amp;gt;movieExporterType&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The static &amp;lt;tt&amp;gt;ComponentIdentifier.find()&amp;lt;/tt&amp;gt; method finds matching components, but instead of offering an array or other collection of matches, it requires you to repeatedly pass in the &amp;lt;tt&amp;gt;ComponentDescription&amp;lt;/tt&amp;gt; template, along with the previous &amp;lt;tt&amp;gt;ComponentIdentifier&amp;lt;/tt&amp;gt; found by the method. For the first iteration, this will be &amp;lt;tt&amp;gt;null&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;find( )&amp;lt;/tt&amp;gt; call returns a &amp;lt;tt&amp;gt;ComponentIdentifier&amp;lt;/tt&amp;gt;, which you pass to the &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt; constructor to create a new exporter. When &amp;lt;tt&amp;gt;find( )&amp;lt;/tt&amp;gt; returns &amp;lt;tt&amp;gt;null&amp;lt;/tt&amp;gt;, there are no more matches.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''Yes, this is ''totally'' weird, at least from a Java perspective''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The matched &amp;lt;tt&amp;gt;ComponentIdentifier&amp;lt;/tt&amp;gt; provides information about itself via the &amp;lt;tt&amp;gt;getInfo( )&amp;lt;/tt&amp;gt; method. This returns another &amp;lt;tt&amp;gt;ComponentDescription&amp;lt;/tt&amp;gt; object, different from the one used as a template. You can use this to get type and subtype information (as &amp;lt;tt&amp;gt;FOUR_CHAR_CODE&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;s, of course), a name, an information &amp;lt;tt&amp;gt;String&amp;lt;/tt&amp;gt;, a manufacturer code, etc.&lt;br /&gt;
&lt;br /&gt;
Finding a &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt; is no guarantee that it actually will work. You can call &amp;lt;tt&amp;gt;validate( )&amp;lt;/tt&amp;gt;, as this example does, to check that the instantiated exporter can do an export from the given movie. In this example, if validate throws an exception, it's logged to standard out and the exporter is not added to the &amp;lt;tt&amp;gt;JComboBox&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== What about... ===&lt;br /&gt;
&lt;br /&gt;
...setting the export parameters programmatically, instead of using the export dialog every time? This is possible, although it will require using the export dialog at least once in development. A configured &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt; can return its configured state in the form of an &amp;lt;tt&amp;gt;AtomContainer&amp;lt;/tt&amp;gt; object, by way of the &amp;lt;tt&amp;gt;getExportSettingsFromAtomContainer()&amp;lt;/tt&amp;gt; method. This object can be passed to an exporter via the &amp;lt;tt&amp;gt;setExportSettingsFromAtomContainer()&amp;lt;/tt&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
&amp;quot;''Atoms&amp;quot; are a low-level data structure that do almost all of QuickTime's heavy lifting. Application-level code uses them only for really advanced stuff (see [[QuickTime for Java: A Developer's Notebook/Miscellaneous Media|Chapter 9]])''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Within a single running application, this is pretty straightforward. To persist between sessions, you must save off the native structure by calling &amp;lt;tt&amp;gt;getBytes( )&amp;lt;/tt&amp;gt; on the &amp;lt;tt&amp;gt;AtomContainer&amp;lt;/tt&amp;gt; and then persist it to disk, database, etc. To recreate the settings in the future, read the bytes into a byte array, create a &amp;lt;tt&amp;gt;QTHandle&amp;lt;/tt&amp;gt; from the array, and then pass that to &amp;lt;tt&amp;gt;AtomContainer.fromQTHandle( )&amp;lt;/tt&amp;gt; to create the &amp;lt;tt&amp;gt;AtomContainer&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
QuickTime 6.3 introduced a new API for setting exporters programmatically, but as of this writing, it has not been exposed via QTJ method calls.&lt;br /&gt;
&lt;br /&gt;
Also, if I specify type and subtype, will I always get one match? No, in some cases, you'll get multiple matching components, and you might need to use other criteria to pick which one to use. In a rather infamous case pointed out by one of my tech reviewers:&lt;br /&gt;
&lt;br /&gt;
Sometimes you get more than one exporter with the same subtype and need to use the &amp;quot;manufacturer&amp;quot; code to distinguish them. This applies particularly to AIFF exporters—the first exporter you find of that type only exports MIDI. To export an arbitrary QT audio file to AIFF you need to explicitly iterate and pick the second one!&lt;br /&gt;
&lt;br /&gt;
== Importing and Exporting Graphics ==&lt;br /&gt;
&lt;br /&gt;
QuickTime offers many components whose job is to import from and export to different graphics formats. As you might expect, these components are wrapped by classes called &amp;lt;tt&amp;gt;GraphicsImporter&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;GraphicsExporter&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;GraphicImportExport&amp;lt;/tt&amp;gt; example application (shown in [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-EX-3|Example 4-3]]) uses both of these classes to illustrate the dynamic lookup of importers and exporters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''Compile and run this example with ant run-ch04-graphicimport-export.''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-EX-3&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 4-3. Graphics import and export'''&lt;br /&gt;
&lt;br /&gt;
 package com.oreilly.qtjnotebook.ch04;&lt;br /&gt;
  &lt;br /&gt;
 import quicktime.*;&lt;br /&gt;
 import quicktime.io.*;&lt;br /&gt;
 import quicktime.std.*;&lt;br /&gt;
 import quicktime.std.comp.*;&lt;br /&gt;
 import quicktime.std.image.*;&lt;br /&gt;
 import quicktime.app.view.*;&lt;br /&gt;
 import java.awt.*;&lt;br /&gt;
 import java.awt.event.*;&lt;br /&gt;
 import javax.swing.*;&lt;br /&gt;
 import java.util.Vector;&lt;br /&gt;
 import java.io.*;&lt;br /&gt;
  &lt;br /&gt;
 import com.oreilly.qtjnotebook.ch01.QTSessionCheck;&lt;br /&gt;
  &lt;br /&gt;
 public class GraphicImportExport extends Object {&lt;br /&gt;
  &lt;br /&gt;
   Button exportButton;&lt;br /&gt;
   Frame frame;&lt;br /&gt;
   GraphicsImporter importer;&lt;br /&gt;
  &lt;br /&gt;
   static final int[  ] imagetypes =&lt;br /&gt;
        { StdQTConstants.kQTFileTypeQuickTimeImage};&lt;br /&gt;
   /* other interesting values:&lt;br /&gt;
       StdQTConstants.kQTFileTypeGIF,&lt;br /&gt;
       StdQTConstants.kQTFileTypeJPEG,&lt;br /&gt;
       StdQTConstants4.kQTFileTypePNG,&lt;br /&gt;
       StdQTConstants4.kQTFileTypeTIFF&lt;br /&gt;
       StdQTConstants.kQTFileTypeMacPaint,&lt;br /&gt;
       StdQTConstants.kQTFileTypePhotoShop,&lt;br /&gt;
       StdQTConstants.kQTFileTypePICS,&lt;br /&gt;
       StdQTConstants.kQTFileTypePicture,&lt;br /&gt;
   */&lt;br /&gt;
  &lt;br /&gt;
   public static void main (String[  ] args) {&lt;br /&gt;
       new GraphicImportExport( );&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
   public GraphicImportExport( ) {&lt;br /&gt;
       try {&lt;br /&gt;
           QTSessionCheck.check( );&lt;br /&gt;
           QTFile inFile =  QTFile.standardGetFilePreview (imagetypes);&lt;br /&gt;
           importer = new GraphicsImporter (inFile);&lt;br /&gt;
           // put image onscreen&lt;br /&gt;
           QTComponent qtc = QTFactory.makeQTComponent (importer);&lt;br /&gt;
           java.awt.Component c = qtc.asComponent( );&lt;br /&gt;
           frame = new Frame (&amp;quot;Imported image&amp;quot;);&lt;br /&gt;
           frame.setLayout (new BorderLayout( ));&lt;br /&gt;
           frame.add (c, BorderLayout.CENTER);&lt;br /&gt;
           exportButton = new Button (&amp;quot;Export&amp;quot;);&lt;br /&gt;
           exportButton.addActionListener (new ActionListener( ) {&lt;br /&gt;
               public void actionPerformed (ActionEvent ae) {&lt;br /&gt;
                   try {&lt;br /&gt;
                       doExport( );&lt;br /&gt;
                   } catch (QTException qte) {&lt;br /&gt;
                       qte.printStackTrace( );&lt;br /&gt;
                   }&lt;br /&gt;
               }&lt;br /&gt;
           });&lt;br /&gt;
           frame.add (exportButton, BorderLayout.SOUTH);&lt;br /&gt;
           frame.pack( );&lt;br /&gt;
           frame.setVisible(true);&lt;br /&gt;
       } catch (QTException qte) {&lt;br /&gt;
           qte.printStackTrace( );&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   public void doExport( ) throws QTException {&lt;br /&gt;
       // build list of GraphicExporters&lt;br /&gt;
       Vector choices = new Vector( );&lt;br /&gt;
       ComponentDescription cd =&lt;br /&gt;
           new ComponentDescription (&lt;br /&gt;
               StdQTConstants.graphicsExporterComponentType);&lt;br /&gt;
       ComponentIdentifier ci = null;&lt;br /&gt;
       while ( (ci = ComponentIdentifier.find(ci, cd)) != null) {&lt;br /&gt;
           choices.add (new ExportChoice (ci.getInfo( ).getName( ),&lt;br /&gt;
                                          ci.getInfo( ).getSubType( )));&lt;br /&gt;
       }&lt;br /&gt;
  &lt;br /&gt;
       // offer a choice of movie exporters&lt;br /&gt;
       JComboBox exportCombo = new JComboBox (choices);&lt;br /&gt;
       JOptionPane.showMessageDialog (frame,&lt;br /&gt;
                                      exportCombo,&lt;br /&gt;
                                      &amp;quot;Choose exporter&amp;quot;,&lt;br /&gt;
                                      JOptionPane.PLAIN_MESSAGE);&lt;br /&gt;
       ExportChoice choice = &lt;br /&gt;
           (ExportChoice) exportCombo.getSelectedItem( );&lt;br /&gt;
       System.out.println (&amp;quot;chose &amp;quot; + choice.name);&lt;br /&gt;
  &lt;br /&gt;
       // build a GE, wire up to the GraphicsImporter&lt;br /&gt;
       GraphicsExporter exporter =&lt;br /&gt;
           new GraphicsExporter (choice.subtype);&lt;br /&gt;
       exporter.setInputGraphicsImporter (importer);&lt;br /&gt;
  &lt;br /&gt;
       // ask for destination, settings&lt;br /&gt;
       FileDialog fd =&lt;br /&gt;
           new FileDialog (frame, &amp;quot;Save As&amp;quot;, &lt;br /&gt;
                           FileDialog.SAVE);&lt;br /&gt;
       fd.setVisible(true);&lt;br /&gt;
       String filename = fd.getFile( );&lt;br /&gt;
       if (filename.indexOf('.') =  = -1)&lt;br /&gt;
           filename = filename + &amp;quot;.&amp;quot; +&lt;br /&gt;
               exporter.getDefaultFileNameExtension( );&lt;br /&gt;
       File file = new File (fd.getDirectory( ), filename);&lt;br /&gt;
       exporter.setOutputFile (new QTFile(file));&lt;br /&gt;
       exporter.requestSettings( );&lt;br /&gt;
  &lt;br /&gt;
       // export&lt;br /&gt;
       exporter.doExport( );&lt;br /&gt;
  &lt;br /&gt;
       // need to explicitly quit (since awt is running)&lt;br /&gt;
       System.exit(0);&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
   public class ExportChoice {&lt;br /&gt;
       String name;&lt;br /&gt;
       int subtype;&lt;br /&gt;
       public ExportChoice (String n, int st) {&lt;br /&gt;
           name = n;&lt;br /&gt;
           subtype = st;&lt;br /&gt;
       }&lt;br /&gt;
       public String toString( ) {&lt;br /&gt;
           return name;&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When run, the program shows a dialog to select a graphic to be imported. On Windows, the &amp;quot;file type&amp;quot; in this dialog is QuickTime Image. Once an image is selected, it appears in a window with an &amp;quot;export&amp;quot; button. When the user clicks the button, she is asked for an export type, as shown in [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-FIG-6|Figure 4-6]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''GraphicsImporter and GraphicsExporter are in quicktime.std.image, not quicktime.std.qtcomponents like most other components''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-FIG-6&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-6. Selecting a GraphicsExporter'''&lt;br /&gt;
&lt;br /&gt;
[[Image:QuickTime for Java: A Developer's Notebook_I_4_tt65.png|Selecting a GraphicsExporter]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this, the program displays a configuration dialog specific to the type of exporter selected—at a minimum, this dialog usually offers a choice of color depths (256 colors, 256 grays, millions of colors, etc.). Next, a save dialog requests the location of the exported file. Once approved, the program converts the image to the specified format and saves it to the supplied location.&lt;br /&gt;
&lt;br /&gt;
=== What just happened? ===&lt;br /&gt;
&lt;br /&gt;
Notice the &amp;lt;tt&amp;gt;QTFile.standardGetFilePreview()&amp;lt;/tt&amp;gt; . This shows a file-open dialog and takes an array of up to four &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;s, representing &amp;lt;tt&amp;gt;FOUR_CHAR_CODE&amp;lt;/tt&amp;gt; s of various file format constants, which are used as a filter of what file types to make selectable. You can use &amp;lt;tt&amp;gt;kQTFileTypeQuickTimeImage&amp;lt;/tt&amp;gt; as a convenient wildcard that matches any kind of image QuickTime can open, though it seems to work only on Windows (on the Mac, any file can be selected).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tip&amp;quot;&amp;gt;&lt;br /&gt;
'''Tip'''&lt;br /&gt;
&lt;br /&gt;
If you want to specify formats, interesting constants in &amp;lt;tt&amp;gt;StdQTConstants&amp;lt;/tt&amp;gt; include &amp;lt;tt&amp;gt;kQTFileTypeGIF&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;kQTFileTypeJPEG&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;kQTFileTypePhotoShop&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;StdQTConstants4&amp;lt;/tt&amp;gt; class adds similarly named constants for PNG and TIFF. Unfortunately, you can send only four.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Given a file, you can construct a &amp;lt;tt&amp;gt;GraphicsImporter&amp;lt;/tt&amp;gt; object to load it into QuickTime. To put the imported image on-screen, pass the importer to &amp;lt;tt&amp;gt;QTFactory.makeQTComponent()&amp;lt;/tt&amp;gt; , which returns a &amp;lt;tt&amp;gt;QTComponent&amp;lt;/tt&amp;gt; that you can either cast to an AWT &amp;lt;tt&amp;gt;Component&amp;lt;/tt&amp;gt; or, to be type-safe, convert with the &amp;lt;tt&amp;gt;asComponent( )&amp;lt;/tt&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
'''Warning'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;java.awt&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;quicktime.std.comp&amp;lt;/tt&amp;gt; both define a class called &amp;lt;tt&amp;gt;Component&amp;lt;/tt&amp;gt; . If you're casually &amp;lt;tt&amp;gt;import&amp;lt;/tt&amp;gt;ing every class from these packages, you're probably headed for a compile-time error. You'll have to make your imports more selective or use a fully qualified class name for one of the &amp;lt;tt&amp;gt;Component&amp;lt;/tt&amp;gt;s, like this example does.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To export an image to another format, you can search for graphics exporter subtypes by creating a &amp;lt;tt&amp;gt;ComponentDescription&amp;lt;/tt&amp;gt; template to match components of the &amp;lt;tt&amp;gt;graphicsExporterComponentType&amp;lt;/tt&amp;gt;. In the example, the names of matching components are shown in a &amp;lt;tt&amp;gt;JComboBox&amp;lt;/tt&amp;gt;. With a subtype selected, create the &amp;lt;tt&amp;gt;GraphicsExporter&amp;lt;/tt&amp;gt; by passing the subtype to its constructor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''This method of looking up exporter components was shown in the previous lab''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;GraphicsExporter&amp;lt;/tt&amp;gt; needs to be wired up to some kind of source image. With a &amp;lt;tt&amp;gt;GraphicsImporter&amp;lt;/tt&amp;gt;, you wire the two together with &amp;lt;tt&amp;gt;setInputGraphicsImporter()&amp;lt;/tt&amp;gt; . The exporter also needs a destination. If writing to a file (as opposed to, say, memory), you set this with &amp;lt;tt&amp;gt;setOutputFile( )&amp;lt;/tt&amp;gt; —just to be safe, it's wise to sanity-check the user-provided filename extension against the value returned by the exporter's &amp;lt;tt&amp;gt;getDefaultFileNameExtension()&amp;lt;/tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The user probably wants some say in the color depth, image quality, and other settings for the export, a dialog for which is provided with a &amp;lt;tt&amp;gt;requestSettings()&amp;lt;/tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
After all that, you finally can do the export with...&amp;lt;tt&amp;gt;doExport( )&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== What about... ===&lt;br /&gt;
&lt;br /&gt;
...other sources for the export? The Javadoc for &amp;lt;tt&amp;gt;GraphicsExporter&amp;lt;/tt&amp;gt; shows a bunch of &amp;lt;tt&amp;gt;setInputXXX( )&amp;lt;/tt&amp;gt; methods. True enough, and in the next chapter, we'll explore some of these, including &amp;lt;tt&amp;gt;Pict&amp;lt;/tt&amp;gt;s, &amp;lt;tt&amp;gt;QDGraphics&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;PixMap&amp;lt;/tt&amp;gt;s.&lt;br /&gt;
&lt;br /&gt;
And what about setting export parameters programmatically? QTJ exposes some methods that could be used instead of the user dialog, such as &amp;lt;tt&amp;gt;setDepth()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;setCompressionMethod( )&amp;lt;/tt&amp;gt;. One interesting method, &amp;lt;tt&amp;gt;setTargetDataSize( )&amp;lt;/tt&amp;gt; , lets exporters with a &amp;quot;quality&amp;quot; option (like JPEG) find a value that will result in a file of the given size in bytes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''GraphicsExporters have an AtomContainer-based settings scheme that's just as painful as the MovieExporter equivalent from the last lab''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Discovering All Installed Components ==&lt;br /&gt;
&lt;br /&gt;
I hope that by this point you're at least a little interested in what other kinds of components are available in QuickTime. It's easy to discover them all, in much the same way we discovered the various &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt;s and &amp;lt;tt&amp;gt;GraphicExporter&amp;lt;/tt&amp;gt;s: by providing a &amp;lt;tt&amp;gt;ComponentDescription&amp;lt;/tt&amp;gt; template and using &amp;lt;tt&amp;gt;ComponentIdentifier.find( )&amp;lt;/tt&amp;gt;. With a &amp;quot;blank&amp;quot; template, all components can be revealed.&lt;br /&gt;
&lt;br /&gt;
=== How do I do that? ===&lt;br /&gt;
&lt;br /&gt;
[[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-EX-4|Example 4-4]] discovers all installed components and logs their type, subtype, and description to standard out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-EX-4&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 4-4. Discovering all installed components'''&lt;br /&gt;
&lt;br /&gt;
 package com.oreilly.qtjnotebook.ch04;&lt;br /&gt;
  &lt;br /&gt;
 import quicktime.*;&lt;br /&gt;
 import quicktime.std.*;&lt;br /&gt;
 import quicktime.std.comp.*;&lt;br /&gt;
 import quicktime.util.QTUtils;&lt;br /&gt;
  &lt;br /&gt;
 import com.oreilly.qtjnotebook.ch01.QTSessionCheck;&lt;br /&gt;
  &lt;br /&gt;
 public class ComponentTour {&lt;br /&gt;
  &lt;br /&gt;
   public static void main (String[  ] args) {&lt;br /&gt;
       try {&lt;br /&gt;
           QTSessionCheck.check( );&lt;br /&gt;
           /* use this wildcard to show all components in QT&lt;br /&gt;
           */&lt;br /&gt;
           ComponentDescription wildcard =&lt;br /&gt;
               new ComponentDescription( ); &lt;br /&gt;
           ComponentIdentifier ci = null;&lt;br /&gt;
           while ( (ci = ComponentIdentifier.find(ci, wildcard)) != null) {&lt;br /&gt;
               ComponentDescription cd = ci.getInfo( );&lt;br /&gt;
               System.out.println (cd.getName( ) + &lt;br /&gt;
                                   &amp;quot; (&amp;quot; + &lt;br /&gt;
                                   QTUtils.fromOSType (cd.getType( )) +&lt;br /&gt;
                                   &amp;quot;/&amp;quot; +&lt;br /&gt;
                                   QTUtils.fromOSType (cd.getSubType( )) +&lt;br /&gt;
                                   &amp;quot;) &amp;quot; + &lt;br /&gt;
                                   cd.getInformationString( ));&lt;br /&gt;
           }&lt;br /&gt;
           &lt;br /&gt;
       } catch (QTException qte) {&lt;br /&gt;
           qte.printStackTrace( );&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The resulting output is hundreds of lines long, looking something like this:&lt;br /&gt;
&lt;br /&gt;
 run-ch04-componenttour:&lt;br /&gt;
  [java] Apple MP3 Decoder (adec/.mp3) An AudioCodec that decodes MPEG-1, MPEG-2, &lt;br /&gt;
 MPEG-2.5 Layer III into linear PCM data&lt;br /&gt;
  [java] MPEG-4 AAC Decoder (adec/aac ) An AudioCodec that decodes MPEG-4 AAC into &lt;br /&gt;
 linear PCM data&lt;br /&gt;
  [java] Apple Lossless Decoder (adec/alac) An AudioCodec that decodes Apple Lossless &lt;br /&gt;
 into linear PCM data&lt;br /&gt;
  [java] Apple IMA4 Decoder (adec/ima4) An AudioCodec that decodes IMA4 into linear &lt;br /&gt;
 PCM data&lt;br /&gt;
  [java] MPEG-4 AAC Encoder (aenc/aac ) An AudioCodec that encodes linear PCM data &lt;br /&gt;
 into MPEG-4 AAC&lt;br /&gt;
  [java] Apple Lossless Encoder (aenc/alac) An AudioCodec that encodes linear PCM &lt;br /&gt;
 data into Apple Lossless&lt;br /&gt;
  [java] Apple IMA4 Encoder (aenc/ima4) An AudioCodec that encodes linear PCM data &lt;br /&gt;
 into IMA4&lt;br /&gt;
  [java] Applet (aplt/scpt) The component that runs script applications&lt;br /&gt;
  [java] Apple: AUConverter (aufc/conv) AudioConverter unit&lt;br /&gt;
  [java] Apple: AUVarispeed (aufc/vari) Apple's varispeed playback&lt;br /&gt;
 [...]&lt;br /&gt;
&lt;br /&gt;
=== What just happened? ===&lt;br /&gt;
&lt;br /&gt;
The key is the line that gets a &amp;lt;tt&amp;gt;ComponentDescriptor&amp;lt;/tt&amp;gt; via a no-arg constructor. This creates a completely blank template for &amp;lt;tt&amp;gt;ComponentIdentifier.find( )&amp;lt;/tt&amp;gt; to run against. Of course, if you just wanted to tour components of a specific type, you could pass in a type constant such as &amp;lt;tt&amp;gt;StdQTConstants.movieImportType&amp;lt;/tt&amp;gt;, which would limit the search to &amp;lt;tt&amp;gt;MovieImporter&amp;lt;/tt&amp;gt;s, and thus indicate what kinds of formats QuickTime can import.&lt;br /&gt;
&lt;br /&gt;
Documenting and explaining every kind of component is beyond the scope of this book—in fact, it filled up a whole volume of the old ''Inside Macintosh'' series. Still, a few of the important ones are listed in [[QuickTime for Java: A Developer's Notebook/Working with Components#quicktimejvaadn-CHP-4-TABLE-1|Table 4-1]]. Note that not all components have (or need) a Java wrapper class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;quicktimejvaadn-CHP-4-TABLE-1&amp;quot;&amp;gt;&lt;br /&gt;
'''Table 4-1. Some important QuickTime for Java components'''&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Type !! Java wrapper class !! Sample subtypes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;tt&amp;gt;eat&amp;lt;/tt&amp;gt;&amp;quot; || &amp;lt;tt&amp;gt;MovieImporter&amp;lt;/tt&amp;gt; || &amp;quot;&amp;lt;tt&amp;gt;AVI&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;AIFF&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;MP3&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;SWF&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;tt&amp;gt;spit&amp;lt;/tt&amp;gt; &amp;quot; || &amp;lt;tt&amp;gt;MovieExporter&amp;lt;/tt&amp;gt; || &amp;quot;&amp;lt;tt&amp;gt;VfW&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;MooV&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;mpg4&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;tt&amp;gt;grip&amp;lt;/tt&amp;gt;&amp;quot; || &amp;lt;tt&amp;gt;GraphicsImporter&amp;lt;/tt&amp;gt; || &amp;quot;&amp;lt;tt&amp;gt;BMP&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;GIF&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;JPEG&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;tt&amp;gt;grex&amp;lt;/tt&amp;gt;&amp;quot; || &amp;lt;tt&amp;gt;GraphicsExporter&amp;lt;/tt&amp;gt; || &amp;quot;&amp;lt;tt&amp;gt;BMP&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;JPEG&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;tt&amp;gt;clok&amp;lt;/tt&amp;gt;&amp;quot; || &amp;lt;tt&amp;gt;Clock&amp;lt;/tt&amp;gt; (provides timing and callback services) || &amp;quot;&amp;lt;tt&amp;gt;tick&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;micr&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;tt&amp;gt;mhlr&amp;lt;/tt&amp;gt;&amp;quot; || &amp;lt;tt&amp;gt;MediaHandler&amp;lt;/tt&amp;gt; || &amp;quot;&amp;lt;tt&amp;gt;vide&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;soun&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;text&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;tt&amp;gt;imco&amp;lt;/tt&amp;gt;&amp;quot; || None; image compressor (used for still images and video) || &amp;quot;&amp;lt;tt&amp;gt;jpeg&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;mp4v&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;h263&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;tt&amp;gt;imdc&amp;lt;/tt&amp;gt;&amp;quot; || None; image decompressor (used for still images and video) || &amp;quot;&amp;lt;tt&amp;gt;jpeg&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;mp4v&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;h263&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;tt&amp;gt;rtpm&amp;lt;/tt&amp;gt;&amp;quot; || None; real-time packetizer (used for streaming) || &amp;quot;&amp;lt;tt&amp;gt;263+&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;mpeg&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;mp4a&amp;lt;/tt&amp;gt;&amp;quot;, &amp;quot;&amp;lt;tt&amp;gt;mp4v&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
''Yep, &amp;quot;eat&amp;quot; and &amp;quot;spit&amp;quot; for movie importers and exporters. Hardy har har''.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's important to remember that all types and subtypes are &amp;lt;tt&amp;gt;FOUR_CHAR_CODE&amp;lt;/tt&amp;gt; s—any type or subtype seemingly shorter than that is padded with space characters.&lt;/div&gt;</description>
			<pubDate>Thu, 06 Mar 2008 23:50:56 GMT</pubDate>			<dc:creator>Docbook2Wiki</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:QuickTime_for_Java:_A_Developer%27s_Notebook/Working_with_Components</comments>		</item>
	</channel>
</rss>