Class AssetFileReader

java.lang.Object
java.io.Reader
java.io.InputStreamReader
com.tianscar.assetfile.AssetFileReader
All Implemented Interfaces:
Closeable, AutoCloseable, Readable

public class AssetFileReader extends InputStreamReader
An InputStreamReader that packaging an AssetFileInputStream for use.
  • Constructor Details

    • AssetFileReader

      public AssetFileReader(String fileName) throws IOException
      Creates a new AssetFileReader, given the name of the assetFile to read from.
      Parameters:
      fileName - the name of the assetFile to read from
      Throws:
      IOException - If an I/O error occurred
    • AssetFileReader

      public AssetFileReader(@NonNull AssetFile file) throws IOException
      Creates a new AssetFileReader, given the AssetFile to read from.
      Parameters:
      file - the AssetFile to read from
      Throws:
      IOException - If an I/O error occurred
    • AssetFileReader

      public AssetFileReader(@NonNull android.content.res.AssetFileDescriptor afd) throws IOException
      Creates a new AssetFileReader, given the AssetFileDescriptor to read from.
      Parameters:
      afd - the AssetFileDescriptor to read from
      Throws:
      IOException - If an I/O error occurred