package io.grpc.protobuf.lite;

import com.google.protobuf.ExtensionRegistryLite;
import com.google.protobuf.MessageLite;
import com.google.protobuf.Parser;

import javax.annotation.Nonnull;
import java.io.InputStream;

/**
 * Helper class used to expose package-private methods and constants
 */
public class GrpcProtoLiteBackdoor {

    @Nonnull
    public static ExtensionRegistryLite getExtensionRegistry() {
        return ProtoLiteUtils.globalRegistry;
    }

    @Nonnull
    public static InputStream newProtoInputStream(MessageLite message, Parser<?> parser) {
        return new ProtoInputStream(message, parser);
    }
}
