/** * Reads the contents of <code>in</code> and returns them in a map. * @param in the stream to read from * @return the content of <code>in</code> * @throws IOException if an I/O-error occurs */ public Map<String, PerspectiveStation> read( DataInputStream in ) throws IOException { Map<String, DockLayoutComposition> map = situation.readCompositions( in ); Map<String, PerspectiveStation> result = new HashMap<String, PerspectiveStation>(); for( Map.Entry<String, DockLayoutComposition> entry : map.entrySet() ){ PerspectiveElement element = convert( entry.getValue() ); PerspectiveStation station = element == null ? null : element.asStation(); if( station != null ){ result.put( entry.getKey(), station ); } } return result; }
/** * Reads the contents of <code>in</code> and returns them in a map. * @param in the stream to read from * @return the content of <code>in</code> * @throws IOException if an I/O-error ocurrs */ public Map<String, PerspectiveStation> read( DataInputStream in ) throws IOException { Map<String, DockLayoutComposition> map = situation.readCompositions( in ); Map<String, PerspectiveStation> result = new HashMap<String, PerspectiveStation>(); for( Map.Entry<String, DockLayoutComposition> entry : map.entrySet() ){ PerspectiveElement element = convert( entry.getValue() ); PerspectiveStation station = element == null ? null : element.asStation(); if( station != null ){ result.put( entry.getKey(), station ); } } return result; }
Map<String, DockLayoutComposition> stations = conversion.getSituation().readCompositions( in ); factory.setStations( stations );
Map<String, DockLayoutComposition> stations = conversion.getSituation().readCompositions( in ); factory.setStations( stations );