diff --git a/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSink.java b/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSink.java index 80fecf19cc..22ed3892ec 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSink.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSink.java @@ -53,7 +53,6 @@ public final class CacheDataSink implements DataSink { private long dataSpecFragmentSize; private File file; private OutputStream outputStream; - private FileOutputStream underlyingFileOutputStream; private long outputStreamBytesWritten; private long dataSpecBytesWritten; private ReusableBufferedOutputStream bufferedOutputStream; @@ -171,7 +170,7 @@ public final class CacheDataSink implements DataSink { file = cache.startFile( dataSpec.key, dataSpec.absoluteStreamPosition + dataSpecBytesWritten, length); - underlyingFileOutputStream = new FileOutputStream(file); + FileOutputStream underlyingFileOutputStream = new FileOutputStream(file); if (bufferSize > 0) { if (bufferedOutputStream == null) { bufferedOutputStream = new ReusableBufferedOutputStream(underlyingFileOutputStream, diff --git a/library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/AesCipherDataSink.java b/library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/AesCipherDataSink.java index 522fdc9a3f..d9b3ff0069 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/AesCipherDataSink.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/AesCipherDataSink.java @@ -52,10 +52,10 @@ public final class AesCipherDataSink implements DataSink { * * @param secretKey The key data. * @param wrappedDataSink The wrapped {@link DataSink}. - * @param scratch Scratch space. Data is decrypted into this array before being written to the + * @param scratch Scratch space. Data is encrypted into this array before being written to the * wrapped {@link DataSink}. It should be of appropriate size for the expected writes. If a * write is larger than the size of this array the write will still succeed, but multiple - * cipher calls will be required to complete the operation. If {@code null} then decryption + * cipher calls will be required to complete the operation. If {@code null} then encryption * will overwrite the input {@code data}. */ public AesCipherDataSink(byte[] secretKey, DataSink wrappedDataSink, @Nullable byte[] scratch) { @@ -96,5 +96,4 @@ public final class AesCipherDataSink implements DataSink { cipher = null; wrappedDataSink.close(); } - }