things.data
Interface Accessor

All Known Implementing Classes:
FileAccessor, StringAccessor, UniverseObjectAccessor

public interface Accessor

This is an access abstraction.

You are at the mercy of the implementation in terms of multithreading.

Version:
1.0

Version History

EPG - Initial - 13 JAN 05
 
Author:
Erich P. Gatejen

Method Summary
 void doneWithRead(java.io.InputStream ios)
          Declare you are done reading from the input stream.
 void doneWithWrite(java.io.OutputStream oos)
          Declare you are done reading from the input stream.
 java.io.InputStream openForRead()
          Open the item for read.
 java.io.OutputStream openForWrite()
          Open the item for writing.
 

Method Detail

openForRead

java.io.InputStream openForRead()
                                throws ThingsException
Open the item for read. You can assume it is buffered.

Returns:
return an input stream for the item. It will never return null; problems will cause exceptions.
Throws:
ThingsException - for any problem.

doneWithRead

void doneWithRead(java.io.InputStream ios)
                  throws ThingsException
Declare you are done reading from the input stream. It is a good idea to call this, though it shouldn't be fatal if you don't.

Parameters:
ios - the stream you were given when you openForRead(). You may close the stream already, if you want.
Throws:
ThingsException - for any problem.

openForWrite

java.io.OutputStream openForWrite()
                                  throws ThingsException
Open the item for writing. You can assume it is buffered.

Returns:
return an output stream for the item. It will never return null; problems will cause exceptions.
Throws:
ThingsException - for any problem.

doneWithWrite

void doneWithWrite(java.io.OutputStream oos)
                   throws ThingsException
Declare you are done reading from the input stream. It is a good idea to call this, though it shouldn't be fatal if you don't.

Parameters:
oos - the stream you were given when you openForWrite(). You may flush and close the stream already, if you want.
Throws:
ThingsException - for any problem.


Things.