feat(hw-02): implement student and book stream processing

This commit is contained in:
user
2026-08-07 14:57:43 +04:00
parent 3a26e58ae2
commit 21c1190aa7
7 changed files with 388 additions and 0 deletions
@@ -0,0 +1,20 @@
package com.example;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
public final class StudentReader {
public static List<Student> read(Path path) throws IOException {
return MAPPER.readValue(path.toFile(), new TypeReference<List<Student>>() {});
}
private StudentReader() {}
private static final ObjectMapper MAPPER =
new ObjectMapper().registerModule(new JavaTimeModule());
}