private RuntimeException handleAvroRemoteException(AvroRemoteException e) throws TypeException {
// AvroRemoteException's are exceptions which are not declared in the avro protocol and
// which are not RuntimeException's.
if (e.getCause() instanceof IOException) {
throw new IOTypeException(e.getCause());
} else {
throw converter.convert(e);
}
}