Initial commit
This commit is contained in:
25
sources/com/bumptech/glide/load/model/ByteBufferEncoder.java
Normal file
25
sources/com/bumptech/glide/load/model/ByteBufferEncoder.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package com.bumptech.glide.load.model;
|
||||
|
||||
import android.util.Log;
|
||||
import com.bumptech.glide.load.Encoder;
|
||||
import com.bumptech.glide.load.Options;
|
||||
import com.bumptech.glide.util.ByteBufferUtil;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ByteBufferEncoder implements Encoder<ByteBuffer> {
|
||||
@Override // com.bumptech.glide.load.Encoder
|
||||
public boolean a(ByteBuffer byteBuffer, File file, Options options) {
|
||||
try {
|
||||
ByteBufferUtil.a(byteBuffer, file);
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
if (Log.isLoggable("ByteBufferEncoder", 3)) {
|
||||
Log.d("ByteBufferEncoder", "Failed to write data", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user