use of com.hippo.io.UniFileOutputStreamPipe in project EhViewer by seven332.
the class SpiderDen method openDownloadOutputStreamPipe.
/**
* @param extension without dot
*/
@Nullable
private OutputStreamPipe openDownloadOutputStreamPipe(int index, @Nullable String extension) {
UniFile dir = getDownloadDir();
if (dir == null) {
return null;
}
extension = fixExtension('.' + extension);
UniFile file = dir.createFile(generateImageFilename(index, extension));
if (file != null) {
return new UniFileOutputStreamPipe(file);
} else {
return null;
}
}
Aggregations