Tighten the documentation of MetadataInputDecoder

Document that limit() is respected, but position() and arrayOffset()
are assumed to be zero.

PiperOrigin-RevId: 285384613
This commit is contained in:
ibaker 2019-12-13 13:54:01 +00:00 committed by Ian Baker
parent 412db2008b
commit 241a3426d3

View file

@ -16,6 +16,7 @@
package com.google.android.exoplayer2.metadata;
import androidx.annotation.Nullable;
import java.nio.ByteBuffer;
/**
* Decodes metadata from binary data.
@ -25,6 +26,9 @@ public interface MetadataDecoder {
/**
* Decodes a {@link Metadata} element from the provided input buffer.
*
* <p>Respects {@link ByteBuffer#limit()} of {@code inputBuffer.data}, but assumes {@link
* ByteBuffer#position()} and {@link ByteBuffer#arrayOffset()} are both zero.
*
* @param inputBuffer The input buffer to decode.
* @return The decoded metadata object, or null if the metadata could not be decoded.
*/