com.gc.iotools.stream.store
Interface Store

All Known Subinterfaces:
SeekableStore
All Known Implementing Classes:
MemoryStore, OnOffStore, ThresholdStore

public interface Store

Represent a place where bytes are memorized. Used in streams that need to remember the data who was read.

Since:
1.2.0
Author:
dvd.smnt
See Also:
RandomAccessInputStream

Method Summary
 void cleanup()
          Cleans up the Store.
 int get(byte[] bytes, int offset, int length)
          gets length bytes from the store.
 void put(byte[] bytes, int offset, int length)
           
 

Method Detail

cleanup

void cleanup()
Cleans up the Store. Forget all the data previously stored.


get

int get(byte[] bytes,
        int offset,
        int length)
        throws IOException
gets length bytes from the store.

Parameters:
bytes - array where to put the data in.
offset - offset in the array to start put the data.
length - length of the bytes got from the store.
Returns:
number of bytes effectively put in the array or -1 if the Store was empty.
Throws:
IOException

put

void put(byte[] bytes,
         int offset,
         int length)
         throws IOException
Throws:
IOException


Copyright © 2008-2009. All Rights Reserved.