Efficient file system pattern matching in Java