}
private <T> T tryDecode(InputStream data, Class<T> objClass) throws InstantiationException, IllegalAccessException, InvocationTargetException, DecodingException {
int constructorCode = objClass.getAnnotation(Constructor.class).value();
if(constructorCode != integerDecoder.decode(data)) {
throw new DecodingException("Another object was received");
}
T obj = objClass.newInstance();
Field[] fields = objClass.getDeclaredFields();
for(Field field: fields) {
Decoder decoder = lookupDecoder(field);