package io.netty.handler.codec.marshalling;

import io.netty.buffer.ByteBuf;
import org.jboss.marshalling.ByteOutput;

/* JADX INFO: loaded from: classes.dex */
public class ChannelBufferByteOutput implements ByteOutput {
    private final ByteBuf buffer;

    public ChannelBufferByteOutput(ByteBuf byteBuf) {
        this.buffer = byteBuf;
    }

    public void close() {
    }

    public void flush() {
    }

    public ByteBuf getBuffer() {
        return this.buffer;
    }

    public void write(int i2) {
        this.buffer.writeByte(i2);
    }

    public void write(byte[] bArr) {
        this.buffer.writeBytes(bArr);
    }

    public void write(byte[] bArr, int i2, int i3) {
        this.buffer.writeBytes(bArr, i2, i3);
    }
}
