August 1999
Intermediate to advanced
1488 pages
72h 53m
English
file.setPosition(num) file.setPosition(num, refPoint)
The setPosition() method of the File object sets the pointer's position to a relative num location in the file. By default, this is relative to the beginning of the file, but you can pass a reference point to determine where this relative location is located. The possible values of this reference point are listed in Table 8.17.
| Value | Description |
|---|---|
| 0 | Sets the pointer relative to the beginning of the file |
| 1 | Sets the pointer relative to the current pointer position |
| 2 | Sets the pointer relative to the end of the file |
Listing 8.85 uses the setPosition() method to access every other character in the ...
Read now
Unlock full access