public static Pair < TopologySimpleNode , List < Identifier > > decode ( final byte [ ] data , final IdentifierFactory ifac ) { try ( final DataInputStream dstream = new DataInputStream ( new ByteArrayInputStream ( data ) ) ) { final List < Identifier > activeSlaveTasks = new LinkedList <> ( ) ; final TopologySimpleNode retNode = decodeHelper ( dstream , activeSlaveTasks , ifac ) ; return new Pair <> ( retNode , activeSlaveTasks ) ; } catch ( final IOException e ) { throw new RuntimeException ( "Exception while decoding message" , e ) ; } }
Recursively translate a byte array into a TopologySimpleNode and a list of task Identifiers .