Package com.topjohnwu.superuser.io
Class SuFileOutputStream
java.lang.Object
com.topjohnwu.superuser.io.SuFileOutputStream
Open
OutputStreams that read files with root access.
Directly creating instances of this class is deprecated, please use the static helper methods to open new OutputStreams.
-
Method Summary
Modifier and TypeMethodDescriptionstatic OutputStreamSuFileOutputStream.open(file, false)static OutputStreamOpen anOutputStreamwith root access.static OutputStreamSuFileOutputStream.open(new File(path), false)static OutputStreamSuFileOutputStream.open(new File(path), append)
-
Method Details
-
open
SuFileOutputStream.open(new File(path), false)- Throws:
FileNotFoundException
-
open
@NonNull public static OutputStream open(@NonNull String path, boolean append) throws FileNotFoundException SuFileOutputStream.open(new File(path), append)- Throws:
FileNotFoundException
-
open
SuFileOutputStream.open(file, false)- Throws:
FileNotFoundException
-
open
@NonNull public static OutputStream open(@NonNull File file, boolean append) throws FileNotFoundException Open anOutputStreamwith root access.Unless
fileis anSuFile, this method will always try to directly open aFileOutputStream, and fallback to using root access when it fails.- Throws:
FileNotFoundException- See Also:
-