Class WritableByteChannelDecorator
- Object
-
- WritableByteChannelDecorator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,WritableByteChannel
public class WritableByteChannelDecorator extends Object implements WritableByteChannel
A WritableByteChannel that delegates all calls to the underlying WritableByteChannel but forclose()it also calls ShapefileFiles.unlock method to release the lock on the URL.- Author:
- jesse
-
-
Constructor Summary
Constructors Constructor Description WritableByteChannelDecorator(WritableByteChannel newChannel, ShpFiles shapefileFiles, URL url, FileWriter requestor)
-
-
-
Constructor Detail
-
WritableByteChannelDecorator
public WritableByteChannelDecorator(WritableByteChannel newChannel, ShpFiles shapefileFiles, URL url, FileWriter requestor)
-
-
Method Detail
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-