All Downloads are FREE. Search and download functionalities are using the official Maven repository.

skadistats.clarity.processor.reader.PacketInstance Maven / Gradle / Ivy

Go to download

Clarity is an open source replay parser for Dota 2, CSGO, CS2 and Deadlock written in Java.

There is a newer version: 3.1.1
Show newest version
package skadistats.clarity.processor.reader;

import com.google.protobuf.GeneratedMessage;
import skadistats.clarity.ClarityException;
import skadistats.clarity.source.ResetRelevantKind;

import java.io.IOException;

public interface PacketInstance {

    PacketInstance EOF = new PacketInstance<>() {
        @Override
        public int getKind() {
            return -1;
        }

        @Override
        public int getTick() {
            return Integer.MAX_VALUE;
        }

        @Override
        public Class getMessageClass() {
            return null;
        }

        @Override
        public ResetRelevantKind getResetRelevantKind() {
            return null;
        }

        @Override
        public GeneratedMessage parse() throws IOException {
            throw new ClarityException("cannot parse EOF");
        }

        @Override
        public void skip() {
            throw new ClarityException("cannot skip EOF");
        }
    };

    int getKind();
    int getTick();
    Class getMessageClass();
    ResetRelevantKind getResetRelevantKind();
    T parse() throws IOException;
    void skip() throws IOException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy