what-the-bank/sources/io/grpc/okhttp/OkHttpWritableBuffer.java

51 lines
1.3 KiB
Java

package io.grpc.okhttp;
import io.grpc.internal.WritableBuffer;
import o.C15111ghZ;
/* loaded from: classes6.dex */
class OkHttpWritableBuffer implements WritableBuffer {
private final C15111ghZ buffer;
private int readableBytes;
private int writableBytes;
@Override // io.grpc.internal.WritableBuffer
public void release() {
}
/* JADX INFO: Access modifiers changed from: package-private */
public OkHttpWritableBuffer(C15111ghZ c15111ghZ, int i) {
this.buffer = c15111ghZ;
this.writableBytes = i;
}
@Override // io.grpc.internal.WritableBuffer
public void write(byte[] bArr, int i, int i2) {
this.buffer.b(bArr, i, i2);
this.writableBytes -= i2;
this.readableBytes += i2;
}
@Override // io.grpc.internal.WritableBuffer
public void write(byte b) {
this.buffer.b((int) b);
this.writableBytes--;
this.readableBytes++;
}
@Override // io.grpc.internal.WritableBuffer
public int writableBytes() {
return this.writableBytes;
}
@Override // io.grpc.internal.WritableBuffer
public int readableBytes() {
return this.readableBytes;
}
/* JADX INFO: Access modifiers changed from: package-private */
public C15111ghZ buffer() {
return this.buffer;
}
}