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