Code example for ObjectOutputStream

Methods: flushwriteUTF

0
        System.out.println("\n### Code:");
        System.out.println(ergTree.getAssemblerCode());
 
        ObjectOutputStream os;
        try { 
            os = new ObjectOutputStream(new FileOutputStream(nodeFile));
            os.writeUTF(ergTree.getAssemblerCode());
            os.flush();
        } catch (IOException ignored) {
        } 
 
        System.out.println("### Standalone fu");
        String[] s = {nodeFile, "1"};
        try { 
            StandaloneCG.main(s);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } 
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE