private static DiscoverInfo restoreInfoFromFile ( File file ) throws Exception { String fileContent ; try ( DataInputStream dis = new DataInputStream ( new FileInputStream ( file ) ) ) { fileContent = dis . readUTF ( ) ; } if ( fileContent == null ) { return null ; } return PacketParserUtils . parseStanza ( fileContent ) ; }
Tries to restore an DiscoverInfo stanza from a file .