/** * Writes all locations and relationships of the {@link DockStation DockStations} * <code>stations</code> and their children into the stream <code>out</code>. * @param stations The stations to store, only the roots are needed. * @param out the stream to write in * @throws IOException if the stream throws an exception */ public void write( Map<String, DockStation> stations, DataOutputStream out ) throws IOException{ Map<String, DockLayoutComposition> map = new HashMap<String, DockLayoutComposition>(); for( Map.Entry<String, DockStation> entry : stations.entrySet() ){ DockLayoutComposition composition = convert( entry.getValue() ); if( composition != null ){ map.put( entry.getKey(), composition ); } } writeCompositions( map, out ); }
/** * Writes the layout created by <code>stations</code> to <code>out</code>. The data written * by this method can be read by {@link DockSituation#read(DataInputStream)} * @param stations the root-stations to store * @param out the stream to write into * @throws IOException if an I/O-error occurred */ public void write( Map<String, PerspectiveStation> stations, DataOutputStream out ) throws IOException { Map<String, DockLayoutComposition> map = new HashMap<String, DockLayoutComposition>(); for( Map.Entry<String, PerspectiveStation> entry : stations.entrySet() ){ DockLayoutComposition composition = convert( entry.getValue() ); if( composition != null ){ map.put( entry.getKey(), composition ); } } situation.writeCompositions( map, out ); }
/** * Writes the layout created by <code>stations</code> to <code>out</code>. The data written * by this method can be read by {@link DockSituation#read(DataInputStream)} * @param stations the root-stations to store * @param out the stream to write into * @throws IOException if an I/O-error occurred */ public void write( Map<String, PerspectiveStation> stations, DataOutputStream out ) throws IOException { Map<String, DockLayoutComposition> map = new HashMap<String, DockLayoutComposition>(); for( Map.Entry<String, PerspectiveStation> entry : stations.entrySet() ){ DockLayoutComposition composition = convert( entry.getValue() ); if( composition != null ){ map.put( entry.getKey(), composition ); } } situation.writeCompositions( map, out ); }
conversion.getSituation().writeCompositions( stations, out );
conversion.getSituation().writeCompositions( stations, out );