class Id3Decoder implements MetadataDecoder {

  private static @Nullable TextInformationFrame decodeTextInformationFrame(
      ParsableByteArray id3Data, int frameSize, String id) throws UnsupportedEncodingException {
    if (frameSize < 1) {
      // Frame is malformed.
      return null;
    }

    int encoding = id3Data.readUnsignedByte();
    String charset = getCharsetName(encoding);

    byte[] data = new byte[frameSize - 1];
    id3Data.readBytes(data, 0, frameSize - 1);

    int valueEndIndex = indexOfEos(data, 0, encoding);
    String value = new String(data, 0, valueEndIndex, charset);

    return new TextInformationFrame(id, null, value);
  }

  public  Id3Decoder();
  public  Id3Decoder(@Nullable FramePredicate framePredicate);

}