package org.snmp4j.agent.io;

import java.io.IOException;
import java.io.ObjectOutputStream;
import org.snmp4j.smi.Variable;

/* JADX INFO: loaded from: classes.dex */
public class DefaultMOOutput implements MOOutput {
    private ObjectOutputStream os;

    public DefaultMOOutput(ObjectOutputStream objectOutputStream) {
        this.os = objectOutputStream;
    }

    @Override // org.snmp4j.agent.io.MOOutput
    public void close() throws IOException {
        this.os.flush();
        this.os.close();
    }

    @Override // org.snmp4j.agent.io.MOOutput
    public void writeContextBegin(Context context) throws IOException {
        this.os.writeObject(context);
    }

    @Override // org.snmp4j.agent.io.MOOutput
    public void writeContextEnd(Context context) throws IOException {
        this.os.writeObject(context);
    }

    @Override // org.snmp4j.agent.io.MOOutput
    public void writeIndexedVariables(IndexedVariables indexedVariables) throws IOException {
        this.os.writeObject(indexedVariables);
    }

    @Override // org.snmp4j.agent.io.MOOutput
    public void writeManagedObjectBegin(MOInfo mOInfo) throws IOException {
        this.os.writeObject(mOInfo);
    }

    @Override // org.snmp4j.agent.io.MOOutput
    public void writeManagedObjectEnd(MOInfo mOInfo) throws IOException {
        this.os.writeObject(mOInfo);
    }

    @Override // org.snmp4j.agent.io.MOOutput
    public void writeSequence(Sequence sequence) throws IOException {
        this.os.writeObject(sequence);
    }

    @Override // org.snmp4j.agent.io.MOOutput
    public void writeVariable(Variable variable) throws IOException {
        this.os.writeObject(variable);
    }
}
