„Hallo, Amigo!“ Ich habe mir ein paar interessante Aufgaben für Sie ausgedacht.“
„Sie können nur in IntelliJ IDEA abgeschlossen werden. Schauen Sie sich diese interessanten Bedingungen an…“
14
Aufgabe
Java Collections, Level 1, Lektion 4
Your own implementation
Implement the following methods:
1. readBytes - must return all of the bytes in the fileName file.
2. readLines - must return all of the lines in the fileName file. Use the default encoding.
3. writeBytes - must write a byte array to the fileName file.
14
Aufgabe
Java Collections, Level 1, Lektion 4
Search for hidden files
In the Solution class, override the logic of the following two methods:
visitFile - in addition to the existing logic, add all paths to ZIP and RAR files to the archived field;
visitFileFailed - add all paths to inaccessible files to the failed field and return SKIP_SUBTREE.
14
Aufgabe
Java Collections, Level 1, Lektion 4
File downloader
Implement a downloadFile(String urlString, Path downloadDirectory) method whose inputs are a URL to a file to be downloaded and the destination folder for the download.
The method must create a URL object and download the file's contents to the local disk. Download it to a temporary directory first so that if the download fails, there won't be partially downloaded files in your directory.
28
Aufgabe
Java Collections, Level 1, Lektion 4
What's in the folder?
Write a program that will read detailed information about a folder and display it on the console.
First of all, read the folder path from the console.
If the entered path is not a directory, display "[full path] is not a folder" and exit the program.