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

com.google.protobuf.ZeroCopy Maven / Gradle / Ivy

Go to download

Clarity is an open source replay parser for Dota 2 and CSGO 1 and 2 written in Java. This JAR contains the protobuf classes for clarity.

The newest version!
package com.google.protobuf;

public final class ZeroCopy {

    public static ByteString wrap(final byte[] array) {
        return new LiteralByteString(array);
    }

    public static ByteString wrapBounded(final byte[] array, int offset, int length) {
        return new BoundedByteString(array, offset, length);
    }

    public static byte[] extract(final ByteString buf) {
        if (buf instanceof LiteralByteString) {
            return ((LiteralByteString) buf).bytes;
        }
        throw new UnsupportedOperationException("Need a LiteralByteString, got a " + buf.getClass().getName());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy