Class Reader

java.lang.Object
de.paull.lib.files.Reader

public class Reader extends Object
Reader class to read Files
  • Constructor Details

    • Reader

      public Reader()
  • Method Details

    • readRaw

      public static String readRaw(File f) throws IOException
      Read contents of a String to a String
      Parameters:
      f - the file which should be read
      Returns:
      returns the String
      Throws:
      IOException
    • readToStream

      public static InputStream readToStream(String path) throws IOException
      Reads a file as InputStream
      Parameters:
      path - path of file
      Returns:
      InputStream
      Throws:
      IOException - on error
    • readResourceToInputStream

      public static InputStream readResourceToInputStream(String path) throws IOException
      Reads a file out of the resources folder to InputStream
      Parameters:
      path - path of file
      Returns:
      InputStream
      Throws:
      IOException - on error
    • readCompressedFile

      public static String readCompressedFile(File f) throws IOException
      Reads a from the Writer compressed File
      Parameters:
      f - path of file
      Returns:
      raw uncompressed String
      Throws:
      IOException - on error