THE Java™ Programming Language, Fourth Edition
The canonical path is defined by each system. Usually, it is a form of the absolute path with relative components (such as ".." ...
deletion succeeded. Directories must be empty before they are deleted. There are methods to create an underlying file or directo ...
Returns the available filesystem roots, that is, roots of local hierarchical file systems. Windows platforms, for example, have ...
pathSeparatorChar is a colon on UNIX systems. Exercise 20.9: Write a method that, given one or more pathnames, will print all th ...
20.8. Object Serialization The ability to save objects in a byte stream that can be transferred across the network (perhaps for ...
When the serialized hash map is deserialized, the two analogous entries in the new copy of the hash map will have references to ...
if (!hashSet) { hash = name.hashCode(); hashSet = true; } return hash; } // ... override equals, provide other useful methods } ...
state, you will almost certainly need to customize the first serializable class (see the next section). If the first serializabl ...
were serialized. public class BetterName implements Serializable { private String name; private long id; private transient int h ...
write invocations of these methods could have been replaced with a simple invocation of methods that perform default serializati ...
20.8.5. Object Versioning Class implementations change over time. If a class's implementation changes between the time an object ...
private void readObjectNoData() throws ObjectStreamException If, as an object is deserialized, the serialized data lists the sup ...
Rectangle keeps the serialVersionUID of the original version to declare that the versions are compatible. Changing fields that w ...
These methods are invoked when the object is serialized and deserialized, respectively. They are normal public methods, so the e ...
You use the @serialData tag in the doc comment for a writeObject method to document any additional data written by the method. Y ...
Thrown when the validateObject method cannot make the object valid, thus aborting the deserialization. NotActiveExceptionextends ...
20.10. A Taste of New I/O The java.nio package ("New I/O") and its subpackages give you access to high performance I/O, albeit w ...
of simultaneous I/O connections. There is also a reliable file locking mechanism: You can lock a FileChannel and receive a java. ...
Collection<E> The root interface for collections. Provides such methods as add, remove, size, and toArray. • Set<E> ...
The java.util package also provides several useful concrete implementations of these interfaces that will suffice for most of yo ...
«
18
19
20
21
22
23
24
25
26
27
»
Free download pdf