?? save.bsh
字號:
/** Save a serializable Java object to filename. */bsh.help.save = "usage: save( object, filename )";void save( Object obj, String filename ) { file = pathToFile( filename ); if ( !(obj instanceof Serializable) ) { print("Type "+obj.getClass()+" is not serializable"); return; } // Detach bsh objects from the caller's namespace during serialization // NOTE: THIS IS NOT THREAD SAFE if ( obj instanceof bsh.This ) { super.parent = obj.namespace.getParent(); obj.namespace.prune(); } out = new FileOutputStream( file ); oout = new ObjectOutputStream(out); oout.writeObject( obj ); oout.close(); // Reattach bsh objects to the caller's namespace after serialization // NOTE: THIS IS NOT THREAD SAFE if ( obj instanceof bsh.This ) obj.namespace.setParent( super.parent );}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -