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:
write
in interfaceWritableByteChannel
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-