RobocodeObjectInputStream objectStreamReader = null;
try {
objectStreamReader = new RobocodeObjectInputStream(byteStreamReader, (ClassLoader) robotClassLoader);
Serializable message = (Serializable) objectStreamReader.readObject();
MessageEvent event = new MessageEvent(teamMessage.sender, message);
eventManager.add(event);
} finally {
if (objectStreamReader != null) {
objectStreamReader.close();
}