public Class < ? > getClass ( int id ) throws IOException { if ( id < 0 || id > internalIdToClass . length ) { throw new IOException ( "Unknown class id " + id ) ; } Class < ? > clazz = internalIdToClass [ id ] ; if ( clazz == null ) { throw new IOException ( "Unknown class id " + id ) ; } return clazz ; }
This method throws IOException because it is assumed that we got the id from network .