package android.drm;
import java.io.BufferedInputStream;
+import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
file.delete();
}
- private static void quietlyDispose(InputStream stream) {
+ private static void quietlyDispose(Closeable closable) {
try {
- if (null != stream) {
- stream.close();
+ if (null != closable) {
+ closable.close();
}
} catch (IOException e) {
// no need to care, at least as of now
}
}
- private static void quietlyDispose(OutputStream stream) {
- try {
- if (null != stream) {
- stream.close();
- }
- } catch (IOException e) {
- // no need to care
- }
- }
-
/**
* Gets an instance of {@link DrmUtils.ExtendedMetadataParser}, which can be used to parse
* extended metadata embedded in DRM constraint information.