Class 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 for close() it also calls ShapefileFiles.unlock method to release the lock on the URL.
    Author:
    jesse
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 AutoCloseable
        Specified by:
        close in interface Channel
        Specified by:
        close in interface Closeable
        Throws:
        IOException
      • isOpen

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