Kevin Jackson wrote:
I found it in Kev's (long :) mail:



Sorry it was rather long, but there were a few files packed in there!
No problem, I should have washed my glasses this morning, ...
Since the other impls will be conditionally compiled,
we should use Class.forInstance()...


ok, so we use dynamic class-loading to get the correct fileutils?  Is
there an example in the code already of how I should do this, (like in
the ComplilerAdapter code perhaps?)

in the RegexpFactory there is an example.
What would the Project reference be used for?

in the RegexpFactory, a project reference is used so that properties can be accessed, and that the user can direct ant to use a particular implementation.
Kev: your mail showed:

public class NioFileUtils extends FileUtils implements
FileUtilsAdapter {...}

public class Java6FileUtils extends FileUtils
implements FileUtilsAdapter {...}


But shouldn't that actually be:

+public class FileUtils implements FileUtilsAdapter
{...}

public class NioFileUtils extends FileUtils {...}

public class Java6FileUtils extends NioFileUtils {...}


Probably yes, I think I cobbled it together in a hap-hazard fashion -
first the interface, then change the FileUtils etc, so I could
probably remove the implements FileUtilsAdapter from the subclasses, I
just wanted to make sure I wasn't 'polishing a turd', ie wasting time
getting every little thing right, if the overall direction of the code
was wrong.
A last thing : I think that the default buffer size (variable TRANSFER_SIZE) should be reduced from 81920 to 32000 and should be configurable. I used this nio copy before, and larger transfer sizes were sometimes creating exceptions (error messages coming from the operating system).

Thanks for comments
Kev

Antoine


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to