in chill-scrooge/src/main/scala/com/twitter/chill/scrooge/ScroogeThriftStructSerializer.scala [102:112]
override def read(kryo: Kryo, input: Input, thriftStructClass: Class[T]): T =
// code reviewers: is this use of an anonymous inner class ok, or should I separate it out into something outside?
try {
val thriftStructSerializer = lookupThriftStructSerializer(thriftStructClass)
val tSize = input.readInt(true)
val barr = new Array[Byte](tSize)
input.readBytes(barr)
thriftStructSerializer.fromBytes(barr)
} catch {
case e: Exception => throw new RuntimeException("Could not create ThriftStruct " + thriftStructClass, e)
}