File I/O Articles
2 articles about File I/O. Explore Spring Boot implementation, design, and operations across related topics.
-
How to Test File Download APIs with MockMvc in Spring Boot - Verifying Content-Disposition and Binary Responses
Explains how to test file download APIs with MockMvc (downloads after saving a MultipartFile, StreamingResponseBody, Excel/PDF/CSV exports). Covers verifying the Content-Disposition header, matching binary bodies, and testing patterns for Range requests (206 Partial Content), with implementation examples.
-
How to Export and Import CSV in Spring Boot - Handling Character Encoding, Large Datasets, and Validation with OpenCSV
A practical guide to implementing CSV download/upload with Spring Boot and OpenCSV. Covers Shift_JIS/UTF-8+BOM support to prevent garbled text in Excel, memory-efficient output of large datasets with StreamingResponseBody, mapping with @CsvBindByName, and row-level validation with error-row return on import, all explained with code.