Package javatapas.io

Class GetStringFromFile

java.lang.Object
javatapas.io.GetStringFromFile

public class GetStringFromFile
extends Object
Instantiate a Java String from the contents in a Text file.

Published at https://www.javatapas.com/io/Java-Get-String-From-File.html

Javadoc at https://www.javatapas.com/docs/javatapas/io/GetStringFromFile.html
Version:
2021-04-28
Author:
Kodiak Brown
  • Constructor Details

    • GetStringFromFile

      public GetStringFromFile()
  • Method Details

    • getStringFromFile

      public static String getStringFromFile​(String fileName) throws IOException
      Parameters:
      fileName - The name of the source file.
      Throws:
      IOException
    • getStringFromFile

      public static String getStringFromFile​(String fileName, int bufferSize) throws IOException
      Parameters:
      fileName - The name of the source file.
      bufferSize - The size of the character buffer to use in the BufferedReader. A good default option is 1024.
      Throws:
      IOException