org.gloin.resource
Interface ByteStore

All Known Implementing Classes:
FileByteStore

public interface ByteStore

Generic contract through which byte arrays are stored and retrieved. Implementations are responsible for ensuring syncrhronized access to resources in the store.


Field Summary
static int DONT_REPLACE
           
static int REPLACE
           
static int REPLACE_IF_EMPTY
           
 
Method Summary
 byte[] getBytes(java.lang.String pathName)
           
 java.lang.String[] list()
           
 void removeBytes(java.lang.String pathName)
           
 void saveBytes(java.lang.String pathName, byte[] bytes, int replace)
           
 

Field Detail

DONT_REPLACE

public static final int DONT_REPLACE

REPLACE_IF_EMPTY

public static final int REPLACE_IF_EMPTY

REPLACE

public static final int REPLACE
Method Detail

list

public java.lang.String[] list()
                        throws java.io.IOException

saveBytes

public void saveBytes(java.lang.String pathName,
                      byte[] bytes,
                      int replace)
               throws java.io.IOException

getBytes

public byte[] getBytes(java.lang.String pathName)
                throws java.io.IOException

removeBytes

public void removeBytes(java.lang.String pathName)
                 throws java.io.IOException