/*
 * @author Ranides Atterwim <ranides@gmail.com>
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */
package net.ranides.assira.nio;

/**
 * Hipotetyczna hierarchia interfejsów:
 *      IInput - wszystko dziedziczy po tym
 *      IOutput - wszystko dziedziczy po tym
 *      interfejsy miałby metodę #adapter(class)
 *      która by robiła odpowiednie wrappery na Reader/Writer/Stream/DataInput/Channel/Buffer/itd...
 * 
 *      ByteOutput - seek/o
 *      ByteInput - seek/i
 *      ByteChannel = ByteOutput + ByteInput
 * 
 *      CharOutput - seek/o
 *      CharInput - seek/i
 *      CharChannel = CharOutput + CharInput
 * 
 *      DataOutput - seek/o all primitives
 *      DataInput - seek/i all primitives
 *      DataChannel = ByteChannel + CharChannel
 * 
 * To nigdy raczej nie zaistnieje, ale ... pomarzyć można ;)
 * 
 * <h3>Accepted function arguments:</h3>
 * <table valign="top">
 *      <tr><th>input</th><th>output</th><th></th></tr>
 *      <tr>
 *          <td>{@link java.io.InputStream}</td>
 *          <td>{@link java.io.OutputStream}</td>
 *          <td>I/O stream</td>
 *      </tr>
 *      <tr>
 *          <td>{@link java.nio.channels.ReadableByteChannel}</td>
 *          <td>{@link java.nio.channels.WritableByteChannel}</td>
 *          <td>I/O random</td>
 *      </tr>
 *      <tr>
 *          <td>{@link java.io.Reader}</td>
 *          <td>{@link java.io.Writer}</td>
 *          <td>I/O formatted</td>
 *      </tr>
 *      <tr>
 *          <td>{@link java.io.ObjectInputStream}</td>
 *          <td>{@link java.io.ObjectOutputStream}</td>
 *          <td>serialization</td>
 *      </tr>
 *      <tr>
 *          <td>{@link java.io.DataInput}</td>
 *          <td>{@link java.io.DataOutput}</td>
 *          <td>serialization (simple)</td>
 *      </tr>
 * </table>
 * 
 * <h3>Produced return values:</h3>
 * <table valign="top">
 *      <tr><th>input</th><th>output</th><th></th></tr>
 *      <tr>
 *          <td>{@link java.io.InputStream}</td>
 *          <td>{@link java.io.OutputStream}</td>
 *          <td>I/O stream</td>
 *      </tr>
 *      <tr>
 *          <td>{@link java.nio.channels.SeekableByteChannel}</td>
 *          <td>{@link java.nio.channels.SeekableByteChannel}</td>
 *          <td>I/O random access</td>
 *      </tr>
 *      <tr>
 *          <td>{@link java.io.Reader}</td>
 *          <td>{@link java.io.Writer}</td>
 *          <td>I/O formatted</td>
 *      </tr>
 *      <tr>
 *          <td>{@link java.io.ObjectInputStream}</td>
 *          <td>{@link java.io.ObjectOutputStream}</td>
 *          <td>serialization</td>
 *      </tr>
 *      <tr>
 *          <td>{@link java.io.DataInput}</td>
 *          <td>{@link java.io.DataOutput}</td>
 *          <td>serialization (simple)</td>
 *      </tr>
 * </table>
 * 
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public interface Streamable {
    
    // @todo (prev # 4) streamable support
    
    void read(java.io.InputStream istream);
    
    void write(java.io.OutputStream istream);
    
}
