⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 211-212.html

📁 dshfghfhhgsfgfghfhfghgfhfghfgh fg hfg hh ghghf hgf hghg gh fg hg hfg hfh f hg hgfh gkjh kjkh g yj f
💻 HTML
字号:
<HTML>
<HEAD>
<META name=vsisbn content="1558515682"><META name=vstitle content="Java Digital Signal Processing"><META name=vsauthor content="Douglas A. Lyon"><META name=vsimprint content="M&T Books"><META name=vspublisher content="IDG Books Worldwide, Inc."><META name=vspubdate content="11/01/97"><META name=vscategory content="Web and Software Development: Programming, Scripting, and Markup Languages: Java"><TITLE>Java Digital Signal Processing:Futil Recipes for Feudal Times</TITLE>
<!-- HEADER --><STYLE type="text/css">  <!-- A:hover  { 	color : Red; } --></STYLE><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<!--ISBN=1558515682//-->
<!--TITLE=Java Digital Signal Processing//-->
<!--AUTHOR=Douglas A. Lyon//-->
<!--PUBLISHER=IDG Books Worldwide, Inc.//-->
<!--IMPRINT=M & T Books//-->
<!--CHAPTER=4//-->
<!--PAGES=211-212//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->

<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="207-211.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="../ch05/213-219.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H3><A NAME="Heading56"></A><FONT COLOR="#000077">Exercises</FONT></H3>
<P>The astute reader will note that we did not perform local handling of exceptions for <I>StreamTokenizer</I>. We suggest the development of a <I>StreamTokenizer</I> with local handling of exceptions as an exercise.</P>
<P>Another topic for exploration is to extend the <I>futils.DirList</I> class. One useful feature might be to include a constructor that takes a <I>String</I> instance for a suffix. <I>DirList</I> could then construct a <I>WildFilter</I> instance to form a list of only those files whose ending matches the suffix string.</P>
<P>A topic we have not yet seen in any book is the creation of a UNIX-like command-line interface to Java that would let us type commands such as <I>ls *.java &gt; foo</I> into the command-line reader. This could be an excellent way to employ piping and to write a series of data-processing-type tools.</P>
<H3><A NAME="Heading57"></A><FONT COLOR="#000077">Summary</FONT></H3>
<P>In this chapter we covered the <I>Dialog</I> and <I>FileDialog</I> classes as the widgets to use to get file names from the user. <I>Futils.getReadFileName</I> and <I>Futils.getWriteFileName</I> have embedded calls to the <I>FileDialog</I> constructor, so there is no reason to embed a file name into a file in the Java source code. The <I>futils</I> package contains a list of classes that are used daily and save several lines of source code each time they appear in a program.</P>
<P>From a design viewpoint, the programmer might object to handling exceptions locally, as the <I>futils</I> classes attempt to do. This approach generally does not appear to be a problem. In short, we have found the local handling of exceptions to be the correct approach in all cases that we have encountered so far.</P>
<P>This chapter introduced a number of new classes that are unique to this book. The <I>Ls</I> class has the ability to list batches of files using the '<I>ls</I> *.&lt;<I>suffix</I>&gt;" and place the results into internal data structures. The <I>Ls</I> class provides the ability to recursively traverse the directory tree structure using a form that is like the UNIX '<I>ls-al</I>*/*'. The <I>Cat</I> class takes the output of <I>Ls</I> and lists the files into a single file. Batch processing was also used by the <I>HtmlGenerator</I> class to input C, C&#43;&#43; or Java and output colored and formatted HTML, with a hyper-linked HTML index.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="207-211.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="../ch05/213-219.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>

<hr width="90%" size="1" noshade><div align="center"><font face="Verdana,sans-serif" size="1">Copyright &copy; <a href="/reference/idgbooks00001.html">IDG Books Worldwide, Inc.</a></font></div>
<!-- all of the reference materials (books) have the footer and subfoot reveresed --><!-- reference_subfoot = footer --><!-- reference_footer = subfoot --></BODY></HTML><!-- END FOOTER -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -