}
public <E> List<E> readList(ThriftCodec<E> elementCodec)
throws Exception
{
TList tList = protocol.readListBegin();
List<E> list = new ArrayList<>();
for (int i = 0; i < tList.size; i++) {
try {
E element = elementCodec.read(protocol);
list.add(element);