commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@gmail.com>
Subject Re: [io] 2.0 Moving to minimum of JDK 1.5
Date Wed, 06 Feb 2008 11:51:23 GMT
I don't know if it helps this debate, but when I went thru JDK 1.5
changes for IO I came up with the following (which are mostly
generifying methods):

ConditionalFileFilter (interface)
  - public List<IOFileFilter> getFileFilters()
  - public void setFileFilters(final List<IOFileFilter> fileFilters) {

AndFileFilter
  - public AndFileFilter(final List<IOFileFilter> fileFilters)
  - public List<IOFileFilter> getFileFilters()
  - public void setFileFilters(final List<IOFileFilter> fileFilters) {

OrFileFilter
  - public OrFileFilter(final List<IOFileFilter> fileFilters)
  - public List<IOFileFilter> getFileFilters()
  - public void setFileFilters(final List<IOFileFilter> fileFilters) {

NameFileFilter
 - public NameFileFilter(List<String> names)
 - public NameFileFilter(List<String> names, IOCase caseSensitivity)

PrefixFileFilter
 - public PrefixFileFilter(List<String> prefixes)
 - public PrefixFileFilter(List<String> names, IOCase caseSensitivity)

SuffixFileFilter
 - public SuffixFileFilter(List<String> prefixes)
 - public SuffixFileFilter(List<String> names, IOCase caseSensitivity)

WildcardFileFilter
 - public WildcardFileFilter(List<String> prefixes)
 - public WildcardFileFilter(List<String> names, IOCase caseSensitivity)

FileUtils
 - public static File[] convertFileCollectionToFileArray(Collection<File> files)
 - public static Collection<File> listFiles(
 - public static void writeStringToFile(File file, CharSequence data,
String encoding)
   [note CharSequence version replaces String falvour]

ClassLoaderObjectInputStream
 - protected Class<?> resolveClass(ObjectStreamClass objectStreamClass)

ProxyReader
 -  public int read(CharBuffer target) [new method added]

IOUtils
 - public static List<String> readLines(Reader input)
 - public static InputStream toInputStream(CharSequence input)
 - public static InputStream toInputStream(CharSequence input, String encoding)
 - public static void write(CharSequence data, Writer output)
 - public static void write(CharSequence data, OutputStream output)
 - public static void write(CharSequence data, OutputStream output,
String encoding)
[Note CharSequence replaces String and/or StringBuffer flavours]

LineIterator
 - public class LineIterator implements Iterator<String>
 - public String next()   [was returning Object]

NullWriter, ProxyWriter
 - add public Writer append(char c)
 - add public Writer append(CharSequence csq, int start, int end)
 - add public Writer append(CharSequence csq)

So the changes are pretty minimal for IO - question is are these
incompatible changes with generics being erased? If not then perhaps
we can do this without breaking anything.

Niall

On Feb 5, 2008 4:47 AM, Niall Pemberton <niall.pemberton@gmail.com> wrote:
> We've discussed moving to a minimum of JDK 1.5 for IO 2.0 previously -
> theres also an JIRA report here:
>    http://issues.apache.org/jira/browse/IO-140
>
> From memory the preference was to move to a new package name  - how
> about "org.apache.commons.io2"?
>
> Are there any objections to me creating an IO 1.4 branch from the
> current trunk and then starting work on IO 2.0 in the trunk.
>
> Initial plans would be:
>
>  - rename to the new package
>  - remove deprecated items
>  - Making appropriate JDK 1.5 changes (generics, using StringBuilder
> and new Appendable for Writers etc).
>
> Niall
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message