Acquire the write lock, blocking until the write lock is available. Only one writer can acquire the write lock, and when held, no readers can acquire the read lock.
If there are no readers and no waiting writers, mark as having an active writer and return. Otherwise, add a lock to the end of the waiting writer list, and block on it. Caller must call releaseWrite when done (for example, in a finally block).
It is recommended that get*Stream or get*Channel methods are used when reading or writing to the file is desired.
@see #getInputStream(ShpFileType,FileReader) @see #getReadChannel(ShpFileType,FileReader) @see #getWriteChannel(ShpFileType,FileReader) @param type the type of the file desired. @param requestor the object that is requesting the URL. The same object must release the lockand is also used for debugging. @return the URL to the file of the type requested
|
|
|
|
|
|