org.geotools.data.shapefile
Class ReadableByteChannelDecorator

Object
  extended by ReadableByteChannelDecorator
All Implemented Interfaces:
Closeable, Channel, ReadableByteChannel

public class ReadableByteChannelDecorator
extends Object
implements ReadableByteChannel

A ReadableByteChannel that delegates all calls to the underlying ReadableByteChannel but for close() it also calls ShapefileFiles.unlock method to release the lock on the URL.

Author:
jesse
Module:
modules/plugin/shapefile (gt-shapefile.jar)

Constructor Summary
ReadableByteChannelDecorator(ReadableByteChannel newChannel, ShpFiles shapefileFiles, URL url, FileReader requestor)
           
 
Method Summary
 void close()
           
 boolean isOpen()
           
 int read(ByteBuffer dst)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface Closeable
Specified by:
close in interface Channel
Throws:
IOException

isOpen

public boolean isOpen()
Specified by:
isOpen in interface Channel

read

public int read(ByteBuffer dst)
         throws IOException
Specified by:
read in interface ReadableByteChannel
Throws:
IOException


Copyright © 1996-2010 Geotools. All Rights Reserved.