"Hi, Amigo!" I came up with a couple of interesting tasks for you."
"They can only be completed in IntelliJ IDEA. Take a look at these interesting conditions…"
14
Task
Java Collections,
level 1,
lesson 4
Locked
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
Task
Java Collections,
level 1,
lesson 4
Locked
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
Task
Java Collections,
level 1,
lesson 4
Locked
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
Task
Java Collections,
level 1,
lesson 4
Locked
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.
GO TO FULL VERSION