support of comparator in SFTP-Adapter

I've implemented a OlderFirstComparator for the SFTP-transporter similar to the File-implementation.
Same could be probably done for FTP.
can this be optimized? It's kind of inneficient to first turn the array into a list of entries and then back into an array again. Since you're defining the comparator yourself, can you define a more optimal structure? See the comments on the comparator