Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.jetbrains.annotations.NotNull;
- import java.io.IOException;
- import java.nio.file.Files;
- import java.nio.file.Path;
- public class TargetFile {
- @NotNull
- public final String name;
- @NotNull
- public final String content;
- public TargetFile(@NotNull String name, @NotNull String content) {
- this.name = name;
- this.content = content;
- }
- public TargetFile(@NotNull Path path) throws IOException {
- this.name = path.toFile().toString();
- this.content = new String(Files.readAllBytes(path));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement