org.geotools.data.shapefile
Class WritableByteChannelDecorator

Object
  extended by WritableByteChannelDecorator
All Implemented Interfaces:
Closeable, Channel, WritableByteChannel

public class WritableByteChannelDecorator
extends Object
implements WritableByteChannel

A WritableByteChannel that delegates all calls to the underlying WritableByteChannel 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
WritableByteChannelDecorator(WritableByteChannel newChannel, ShpFiles shapefileFiles, URL url, FileWriter requestor)
           
 
Method Summary
 void close()
           
 boolean isOpen()
           
 int write(ByteBuffer src)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface WritableByteChannel
Throws:
IOException

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


Copyright © 1996-2010 Geotools. All Rights Reserved.