package org.bouncycastle.bcpg;

import java.io.IOException;

/* JADX INFO: loaded from: classes2.dex */
public class MarkerPacket extends ContainedPacket {
    byte[] marker;

    public MarkerPacket(BCPGInputStream bCPGInputStream) throws IOException {
        this(bCPGInputStream, false);
    }

    public MarkerPacket(BCPGInputStream bCPGInputStream, boolean z) throws IOException {
        super(10, z);
        this.marker = new byte[]{80, 71, 80};
        bCPGInputStream.readFully(this.marker);
    }

    @Override // org.bouncycastle.bcpg.ContainedPacket
    public void encode(BCPGOutputStream bCPGOutputStream) throws IOException {
        bCPGOutputStream.writePacket(hasNewPacketFormat(), 10, this.marker);
    }
}
