528 lines
13 KiB
XML
528 lines
13 KiB
XML
<?xml version="1.0" ?>
|
|
|
|
<project
|
|
basedir="."
|
|
default="run"
|
|
name="Thinking in Java, 4th Edition (Refreshed) by Bruce Eckel (chapter: io)">
|
|
|
|
<description>
|
|
build.xml for the source code for the io chapter of
|
|
Thinking in Java, 4th Edition (Refreshed) by Bruce Eckel
|
|
Source code available at http://www.MindView.net
|
|
See copyright notice in CopyRight.txt
|
|
|
|
Ant available from: http://ant.apache.org/
|
|
|
|
To see options, type: ant -p
|
|
</description>
|
|
|
|
<condition property="version1.8">
|
|
<equals arg1="1.8" arg2="${ant.java.version}"/>
|
|
</condition>
|
|
|
|
<target name="net_mindview_util">
|
|
<javac includeantruntime="false"
|
|
classpath="${basedir}/.."
|
|
srcdir="${basedir}/../net/mindview/util/">
|
|
<compilerarg value="-Xmaxerrs"/>
|
|
<compilerarg value="10"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<target
|
|
depends="net_mindview_util"
|
|
description="Build all classes in this directory"
|
|
name="build">
|
|
<fail message="J2SE8 required" unless="version1.8"/>
|
|
<echo message="Building 'io'"/>
|
|
<javac includeantruntime="false"
|
|
classpath="${basedir}/.."
|
|
debug="true"
|
|
srcdir="${basedir}">
|
|
<compilerarg value="-Xmaxerrs"/>
|
|
<compilerarg value="10"/>
|
|
</javac>
|
|
<echo message="Build 'io' succeeded"/>
|
|
</target>
|
|
|
|
<target name="AvailableCharSets">
|
|
<java
|
|
classname="AvailableCharSets"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="BasicFileOutput">
|
|
<java
|
|
classname="BasicFileOutput"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="Blip3">
|
|
<java
|
|
classname="Blip3"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="Blips">
|
|
<java
|
|
classname="Blips"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="BufferedInputFile">
|
|
<java
|
|
classname="BufferedInputFile"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="BufferToText">
|
|
<java
|
|
classname="BufferToText"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="ChangeSystemOut">
|
|
<java
|
|
classname="ChangeSystemOut"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="ChannelCopy">
|
|
<java
|
|
classname="ChannelCopy"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true">
|
|
<arg line="ChannelCopy.java test.txt"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="DirectoryDemo">
|
|
<java
|
|
classname="DirectoryDemo"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="DirList">
|
|
<java
|
|
classname="DirList"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true">
|
|
<arg line='"D.*\.java"'/>
|
|
|
|
</java>
|
|
</target>
|
|
|
|
<target name="DirList2">
|
|
<java
|
|
classname="DirList2"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true">
|
|
<arg line='"D.*\.java"'/>
|
|
|
|
</java>
|
|
</target>
|
|
|
|
<target name="DirList3">
|
|
<java
|
|
classname="DirList3"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true">
|
|
<arg line='"D.*\.java"'/>
|
|
|
|
</java>
|
|
</target>
|
|
|
|
<target name="Echo">
|
|
<java
|
|
classname="Echo"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="Endians">
|
|
<java
|
|
classname="Endians"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="FileLocking">
|
|
<java
|
|
classname="FileLocking"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="FileOutputShortcut">
|
|
<java
|
|
classname="FileOutputShortcut"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="FormattedMemoryInput">
|
|
<java
|
|
classname="FormattedMemoryInput"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="FreezeAlien">
|
|
<java
|
|
classname="FreezeAlien"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="GetChannel">
|
|
<java
|
|
classname="GetChannel"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="GetData">
|
|
<java
|
|
classname="GetData"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="GZIPcompress">
|
|
<java
|
|
classname="GZIPcompress"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true">
|
|
<arg line="GZIPcompress.java"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="IntBufferDemo">
|
|
<java
|
|
classname="IntBufferDemo"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="LargeMappedFiles">
|
|
<java
|
|
classname="LargeMappedFiles"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="LockingMappedFiles">
|
|
<java
|
|
classname="LockingMappedFiles"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="Logon">
|
|
<java
|
|
classname="Logon"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="MakeDirectories">
|
|
<java
|
|
classname="MakeDirectories"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true">
|
|
<arg line="MakeDirectoriesTest"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="MappedIO">
|
|
<java
|
|
classname="MappedIO"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="MemoryInput">
|
|
<java
|
|
classname="MemoryInput"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="MyWorld">
|
|
<java
|
|
classname="MyWorld"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="OSExecuteDemo">
|
|
<java
|
|
classname="OSExecuteDemo"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="PreferencesDemo">
|
|
<java
|
|
classname="PreferencesDemo"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target depends="StoreCADState" name="RecoverCADState">
|
|
<java
|
|
classname="RecoverCADState"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="Redirecting">
|
|
<java
|
|
classname="Redirecting"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="SerialCtl">
|
|
<java
|
|
classname="SerialCtl"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="StoreCADState">
|
|
<java
|
|
classname="StoreCADState"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="StoringAndRecoveringData">
|
|
<java
|
|
classname="StoringAndRecoveringData"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="TestEOF">
|
|
<java
|
|
classname="TestEOF"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="TransferTo">
|
|
<java
|
|
classname="TransferTo"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true">
|
|
<arg line="TransferTo.java TransferTo.txt"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="UsingBuffers">
|
|
<java
|
|
classname="UsingBuffers"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="UsingRandomAccessFile">
|
|
<java
|
|
classname="UsingRandomAccessFile"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="ViewBuffers">
|
|
<java
|
|
classname="ViewBuffers"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="Worm">
|
|
<java
|
|
classname="Worm"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="ZipCompress">
|
|
<java
|
|
classname="ZipCompress"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/"
|
|
failonerror="true"
|
|
fork="true">
|
|
<arg line="ZipCompress.java"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="ThawAlien">
|
|
<java
|
|
classname="ThawAlien"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../io/xfiles/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target
|
|
depends="build"
|
|
description="Compile and run"
|
|
name="run">
|
|
<touch file="failures"/>
|
|
<antcall target="AvailableCharSets"/>
|
|
<antcall target="BasicFileOutput"/>
|
|
<antcall target="Blip3"/>
|
|
<antcall target="Blips"/>
|
|
<antcall target="BufferedInputFile"/>
|
|
<antcall target="BufferToText"/>
|
|
<antcall target="ChangeSystemOut"/>
|
|
<antcall target="ChannelCopy"/>
|
|
<antcall target="DirectoryDemo"/>
|
|
<antcall target="DirList"/>
|
|
<antcall target="DirList2"/>
|
|
<antcall target="DirList3"/>
|
|
<antcall target="Endians"/>
|
|
<antcall target="FileLocking"/>
|
|
<antcall target="FileOutputShortcut"/>
|
|
<antcall target="FormattedMemoryInput"/>
|
|
<antcall target="FreezeAlien"/>
|
|
<antcall target="GetChannel"/>
|
|
<antcall target="GetData"/>
|
|
<antcall target="GZIPcompress"/>
|
|
<antcall target="IntBufferDemo"/>
|
|
<antcall target="Logon"/>
|
|
<antcall target="MakeDirectories"/>
|
|
<antcall target="MappedIO"/>
|
|
<antcall target="MemoryInput"/>
|
|
<antcall target="MyWorld"/>
|
|
<antcall target="OSExecuteDemo"/>
|
|
<antcall target="PreferencesDemo"/>
|
|
<antcall target="RecoverCADState"/>
|
|
<antcall target="Redirecting"/>
|
|
<antcall target="SerialCtl"/>
|
|
<antcall target="StoreCADState"/>
|
|
<antcall target="StoringAndRecoveringData"/>
|
|
<antcall target="TestEOF"/>
|
|
<antcall target="TransferTo"/>
|
|
<antcall target="UsingBuffers"/>
|
|
<antcall target="UsingRandomAccessFile"/>
|
|
<antcall target="ViewBuffers"/>
|
|
<antcall target="Worm"/>
|
|
<antcall target="ZipCompress"/>
|
|
<echo message="* Echo must be run by hand *"/>
|
|
<echo message="* LargeMappedFiles must be run by hand *"/>
|
|
<echo message="* LockingMappedFiles must be run by hand *"/>
|
|
<echo message="* ThawAlien must be run by hand *"/>
|
|
<delete file="failures"/>
|
|
</target>
|
|
|
|
<target description="delete all byproducts" name="clean">
|
|
<delete>
|
|
<fileset dir="${basedir}" includes="**/*.class"/>
|
|
<fileset dir="${basedir}" includes="**/*Output.txt"/>
|
|
<fileset dir="${basedir}" includes="**/log.txt"/>
|
|
<fileset dir="${basedir}" includes="failures"/>
|
|
</delete>
|
|
<echo message="clean successful"/>
|
|
</target>
|
|
|
|
</project>
|
|
|
|
|