*
* @throws java.io.IOException
*/
public RemoteInterfaceInfo load(CapInputStream in) throws UnableToReadCapFileException {
RemoteInterfaceInfo remoteInterfaceInfo = new RemoteInterfaceInfo();
// remoteMethodsCount reading
remoteInterfaceInfo.setRemoteMethodsCount(in.readByte());
// remoteMethods reading
remoteInterfaceInfo.getRemoteMethods().clear();
for (int i = 0; i < remoteInterfaceInfo.getRemoteMethodsCount(); i++) {
RemoteMethodInfo rmi = new RemoteMethodInfoRead().load(in);
remoteInterfaceInfo.getRemoteMethods().add(rmi);
}
// hashModifierLength reading
remoteInterfaceInfo.setHashModifierLength(in.readByte());
// hashModifier reading
remoteInterfaceInfo.getHashModifier().clear();
for (int i = 0; i < remoteInterfaceInfo.getHashModifierLength(); i++) {
remoteInterfaceInfo.getHashModifier().add(in.readByte());
}
// classNameLenght reading
remoteInterfaceInfo.setClassNameLength(in.readByte());
// className reading
remoteInterfaceInfo.getClassName().clear();
for (int i = 0; i < remoteInterfaceInfo.getClassNameLength(); i++) {
remoteInterfaceInfo.getClassName().add(in.readByte());
}
// remoteInterfaceCount reading
remoteInterfaceInfo.setRemoteInterfacesCount(in.readByte());
// remoteInterfaces reading
remoteInterfaceInfo.getRemoteInterfaces().clear();
for (int i = 0; i < remoteInterfaceInfo.getRemoteInterfacesCount(); i++) {
remoteInterfaceInfo.getRemoteInterfaces().add(new ClassRefRead().load(in));
}
return remoteInterfaceInfo;
}