package com.bytedance.apm.agent.instrumentation.io;

import com.bytedance.covode.number.Covode;
import java.util.EventObject;

public final class StreamCompleteEvent extends EventObject {
    public static final long serialVersionUID = 1;
    public final long bytes;
    public final Exception exception;

    static {
        Covode.recordClassIndex(23058);
    }

    public final long getBytes() {
        return this.bytes;
    }

    public final Exception getException() {
        return this.exception;
    }

    public final boolean isError() {
        if (this.exception != null) {
            return true;
        }
        return false;
    }

    public StreamCompleteEvent(Object obj, long j) {
        this(obj, j, (Exception) null);
    }

    public StreamCompleteEvent(Object obj, long j, Exception exc) {
        super(obj);
        this.bytes = j;
        this.exception = exc;
    }
}
