java8/src/main/java/com/company/FileReader.java
public String nioFilesReadAllBytes(String filepath) {
        String content = "";
        try {
            content = new String(Files.readAllBytes(Paths.get(filepath)), StandardCharsets.UTF_8);
        } catch (IOException exception) {
            System.out.println("nioFilesReadAllBytes() - IOException: " + exception.toString());
        }

        System.out.println("nioFilesReadAllBytes() - content.length(): " + content.length());
        return content;
    }
/**
     * Reads entire file in one go
     * 5ms - strangely enough, this is actually the fastest method for just extracting content
     * @param filepath
     * @return
     */
Reads entire file in one go
5ms - strangely enough, this is actually the fastest method for just extracting content
@param filepath
@return
Reads entire file in one go 5ms - strangely enough this is actually the fastest method for just extracting content @param filepath @return
public String nioFilesReadAllBytes(String filepath) {
        String content = "";
        try {
            content = new String(Files.readAllBytes(Paths.get(filepath)), StandardCharsets.UTF_8);
        } catch (IOException exception) {
            System.out.println("nioFilesReadAllBytes() - IOException: " + exception.toString());
        }
        System.out.println("nioFilesReadAllBytes() - content.length(): " + content.length());
        return content;
    }
public String nioFilesReadAllBytes ( String filepath ) { String content = "" ; try { content = new String ( Files . readAllBytes ( Paths . get ( filepath ) ) , StandardCharsets . UTF_8 ) ; } catch ( IOException exception ) { System . out . println ( "nioFilesReadAllBytes() - IOException: " + exception . toString ( ) ) ; } System . out . println ( "nioFilesReadAllBytes() - content.length(): " + content . length ( ) ) ; return content ; }
Reads entire file in one go
 5ms - strangely enough, this is actually the fastest method for just extracting content
 @param filepath
 @return
Reads entire file in one go 5ms - strangely enough this is actually the fastest method for just extracting content @param filepath @return