com.gc.iotools.stream.store
Class OnOffStore

java.lang.Object
  extended by com.gc.iotools.stream.store.OnOffStore
All Implemented Interfaces:
SeekableStore, Store

public class OnOffStore
extends Object
implements SeekableStore


Constructor Summary
OnOffStore(SeekableStore store)
           
 
Method Summary
 void cleanup()
          Cleans up the Store.
 void enable(boolean enable)
           
 int get(byte[] bytes, int offset, int length)
           
 void put(byte[] bytes, int offset, int length)
           
 void seek(long position)
          Reposition this Store on a previously read position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnOffStore

public OnOffStore(SeekableStore store)
Method Detail

cleanup

public void cleanup()
Description copied from interface: Store
Cleans up the Store. Forget all the data previously stored.

Specified by:
cleanup in interface Store

enable

public void enable(boolean enable)

get

public int get(byte[] bytes,
               int offset,
               int length)
        throws IOException
Specified by:
get in interface Store
Throws:
IOException

put

public void put(byte[] bytes,
                int offset,
                int length)
         throws IOException
Specified by:
put in interface Store
Throws:
IOException

seek

public void seek(long position)
          throws IOException
Description copied from interface: SeekableStore
Reposition this Store on a previously read position.

Specified by:
seek in interface SeekableStore
Parameters:
position - position to read the data from.
Throws:
IOException - If some error in the internal store happens.
EOFException - If a position is greater than the actual Store size.


Copyright © 2008-2009. All Rights Reserved.