Package com.android.manifmerger
Class ManifestMerger2.FileStreamProvider
java.lang.Object
com.android.manifmerger.ManifestMerger2.FileStreamProvider
- Enclosing class:
- ManifestMerger2
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStreamgetInputStream(File file) Creates a reader for the given file -- which may not necessarily read the contents of the file on disk.
-
Constructor Details
-
FileStreamProvider
public FileStreamProvider()
-
-
Method Details
-
getInputStream
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 invalidIOException
-