Initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.bumptech.glide.load.resource.bytes;
|
||||
|
||||
import com.bumptech.glide.load.data.DataRewinder;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ByteBufferRewinder implements DataRewinder<ByteBuffer> {
|
||||
private final ByteBuffer a;
|
||||
|
||||
public static class Factory implements DataRewinder.Factory<ByteBuffer> {
|
||||
@Override // com.bumptech.glide.load.data.DataRewinder.Factory
|
||||
public DataRewinder<ByteBuffer> a(ByteBuffer byteBuffer) {
|
||||
return new ByteBufferRewinder(byteBuffer);
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.data.DataRewinder.Factory
|
||||
public Class<ByteBuffer> a() {
|
||||
return ByteBuffer.class;
|
||||
}
|
||||
}
|
||||
|
||||
public ByteBufferRewinder(ByteBuffer byteBuffer) {
|
||||
this.a = byteBuffer;
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.data.DataRewinder
|
||||
public void b() {
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.data.DataRewinder
|
||||
public ByteBuffer a() {
|
||||
this.a.position(0);
|
||||
return this.a;
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
package com.bumptech.glide.load.resource.bytes;
|
||||
|
||||
import com.bumptech.glide.load.engine.Resource;
|
||||
import com.bumptech.glide.util.Preconditions;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class BytesResource implements Resource<byte[]> {
|
||||
private final byte[] a;
|
||||
|
||||
public BytesResource(byte[] bArr) {
|
||||
Preconditions.a(bArr);
|
||||
this.a = bArr;
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.engine.Resource
|
||||
public void a() {
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.engine.Resource
|
||||
public Class<byte[]> b() {
|
||||
return byte[].class;
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.engine.Resource
|
||||
public int getSize() {
|
||||
return this.a.length;
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.engine.Resource
|
||||
public byte[] get() {
|
||||
return this.a;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user