Class ManifestMerger2.FileStreamProvider

java.lang.Object
com.android.manifmerger.ManifestMerger2.FileStreamProvider
Enclosing class:
ManifestMerger2

public static class ManifestMerger2.FileStreamProvider extends Object
A ManifestMerger2.FileStreamProvider provides (buffered, if necessary) InputStream instances for a given File handle. Consider providing a ManifestMerger2.ManifestDocumentProvider when manifest DOM is available.
  • Constructor Details

    • FileStreamProvider

      public FileStreamProvider()
  • Method Details

    • getInputStream

      protected InputStream getInputStream(@NonNull File file) throws IOException
      Creates a reader for the given file -- which may not necessarily read the contents of the file on disk. For example, in the IDE, the client will map the file handle to a document in the editor, and read the current contents of that editor whether or not it has been saved.

      This method is responsible for providing its own buffering, if necessary (e.g. when reading from disk, make sure you wrap the file stream in a buffering input stream.)

      Parameters:
      file - the file handle
      Returns:
      the contents of the file
      Throws:
      FileNotFoundException - if the file handle is invalid
      IOException