The FileOutputStream class also has a protected finalize() method that's invoked before
a FileOutputStream object is garbage-collected. This method ensures that files are properly
flushed and closed before the file output stream that opened them is garbage-collected. You
normally don't need to invoke this method explicitly. If you subclass FileOutputStream and
override finalize(), the subclass's finalize() method should invoke this finalize()
method by calling super.finalize().
FileOutputStream类有一个finalize()方法,声明为protected,这个方法在FileOutputStream对象被回收之前被调用。这个方法保证文件在打开的文件输出流被回收之前已经正确写入并且被关闭。这个方法不需要被直接调用,但是如果你继承了FileOutputStream并且重载了finalize()方法,那被覆盖的finalize()需要使用super.finalize()来调用父级的该方法。
I often find it useful to be able to open an arbitrary file and interpret it in an arbitrary fashion.
这句话怎么翻译哦?不是很清楚。
大概这里ARBITRARY表示随机的意思:我发现打开一个任意的文件并且一任意一种方式打开它???不知道对不对,不清楚,等以后技术高点就知道了,哈哈哈哈