org.jdtaus.core.io
Interface StructuredFileListener

All Superinterfaces:
EventListener

public interface StructuredFileListener
extends EventListener

Listener for structural changes of StructuredFiles.

Version:
$Id: StructuredFileListener.java 8044 2009-07-02 01:29:05Z schulte2005 $
Author:
Christian Schulte

Method Summary
 void blocksDeleted(long index, long deletedBlocks)
          Gets called whenever blocks were deleted from the StructuredFile the listener is registered with.
 void blocksInserted(long index, long insertedBlocks)
          Gets called whenever blocks were inserted into the StructuredFile the listener is registered with.
 

Method Detail

blocksDeleted

void blocksDeleted(long index,
                   long deletedBlocks)
                   throws IOException
Gets called whenever blocks were deleted from the StructuredFile the listener is registered with. The block previously at index + deletedBlocks will have moved to index.

Parameters:
index - the index of the first deleted block.
deletedBlocks - the number of blocks which were deleted starting at index inclusive.
Throws:
IOException - if reading or writing fails.

blocksInserted

void blocksInserted(long index,
                    long insertedBlocks)
                    throws IOException
Gets called whenever blocks were inserted into the StructuredFile the listener is registered with. The block previously at index will have moved to index + insertedBlocks.

Parameters:
index - the index of the first inserted block.
insertedBlocks - the number of blocks which were inserted at index.
Throws:
IOException - if reading or writing fails.


Copyright © 2005-2009 jDTAUS. All Rights Reserved.