Summary of file reading method for each Java file format


I wasn't sure about the support status of Java external files, so I organized them.

extension Correspondence Usage
*.csv String for simplicity.split(",",-1)It can be parsed by a method, but exception handling according to the CSV dialect such as double quotation marks and commas in the character string is required.
*.tsv String.split("\t",-1)Parse by method.
*.json JSON-P*1orJSON-B *2 is used.
*.xml Use SAX API or DOM API.

○ ・ ・ ・ A class corresponding to the file is prepared. △ ・ ・ ・ There is no class corresponding to the file, but it can be parsed relatively easily. ☓ ・ ・ ・ Perth is so painful that I don't want to think about it.

Reference material

Recommended Posts

Summary of file reading method for each Java file format
[Java] Summary of for statements
[For beginners] Summary of java constructor
Implementation of clone method for Java Record
Summary of Java environment settings for myself [mac]
Summary of Java support 2018
Links for each version (Japanese version) of Java SE API
[Java11] Stream Summary -Advantages of Stream-
[Java] Summary of regular expressions
[Java] Summary of operators (operator)
Summary of Java language basics
Summary of Java Math class
Benefits of Java static method
[Java] Summary of control syntax
Summary of java error processing
[Java] Summary of design patterns
[Java] Summary of mathematical operations
Activate Excel file A1 cell of each sheet in Java
Summary of values returned by the Spliterator characteristics method #java
Weak reference of JAVA reused instance allocated for each thread
A summary of what Java programmers find when reading Kotlin source for the first time
Summary of rails validation (for myself)
Summary of [Java silver study] package
Generics of Kotlin for Java developers
Summary of object-oriented programming using Java
[Java Silver] Summary of access modifier points
Summary of in-house newcomer study session [Java]
[java] Summary of how to handle char
Summary of changes other than JEP of Java10
[Java] Personal summary of conditional statements (basic)
[Java] for Each and sorted in Lambda
What is the best file reading (Java)
[Rails] Manage data for each seed file
List of download destinations for oracle java
[Java] [Maven3] Summary of how to use Maven3
Summary of CR, LF, CRL of open method
Features of spring framework for java developers
Java Summary of frequently searched type conversions
[Rails] Method summary for conversion / verification / search
Summary of Java Math.random and import (Calendar)
Java method
java (method)
[Java] method
[Java] method
Java that outputs vmg format file in eml format
[Java] Handling of JavaBeans in the method chain
JAVA: jar, aar, view the contents of the file
[java] Summary of how to handle character strings
A brief summary of Bootstrap features for beginners
Review notes for Java 1.7 and later file copies
Technology for reading Java source code in Eclipse
The order of Java method modifiers is fixed
[Java] Personal summary of classes and methods (basic)
[Java] Summary of how to abbreviate lambda expressions
[Java SE 11 Silver] Arrays class method summary [Java beginner]
Method name of static factory method learned from Java 8
A collection of simple questions for Java beginners
Method name of method chain in Java Builder + α
[Introduction to Java] Basics of java arithmetic (for beginners)
Enable / disable SNI in Java for each communication
[Java] Integer information of characters in a text file acquired by the read () method