package io.sentry.metrics; import com.google.android.exoplayer2.C; import java.nio.charset.Charset; import java.util.Map; /* loaded from: classes3.dex */ public final class EncodedMetrics { private static final Charset UTF8 = Charset.forName(C.UTF8_NAME); private final Map> buckets; Map> getBuckets() { return this.buckets; } public EncodedMetrics(Map> map) { this.buckets = map; } public byte[] encodeToStatsd() { StringBuilder sb = new StringBuilder(); for (Map.Entry> entry : this.buckets.entrySet()) { MetricsHelper.encodeMetrics(entry.getKey().longValue(), entry.getValue().values(), sb); } return sb.toString().getBytes(UTF8); } }