net.acomputerdog.BlazeLoader.util.compatibility
Interface IStreamable


public interface IStreamable

Allows an object to communicate with other arbitrary objects through data streams. The data does not have to stay within the JVM; it is permitted to read/write to them externally (such as from a file or over a network). Because the data is sent through streams, there is no guarantee that this IStreamable will receive or send data at a specific time, or that it will at all.


Method Summary
 java.io.InputStream getReadStream(java.lang.String channel)
          Gets an InputStream that allows reading from the owning object on the specified channel.
 java.io.OutputStream getWriteStream(java.lang.String channel)
          Gets an OutputStream that allows writing to the owning object on the specified channel.
 boolean supportsChannel(java.lang.String channel)
          Checks if this IStreamable supports the specified channel.
 

Method Detail

getWriteStream

java.io.OutputStream getWriteStream(java.lang.String channel)
Gets an OutputStream that allows writing to the owning object on the specified channel.

Parameters:
channel - The channel to bind to.
Returns:
Returns an OutputStream that allows writing to the owning object.

getReadStream

java.io.InputStream getReadStream(java.lang.String channel)
Gets an InputStream that allows reading from the owning object on the specified channel.

Parameters:
channel - The channel to bind to.
Returns:
Returns an InputStream that allows reading from the owning object.

supportsChannel

boolean supportsChannel(java.lang.String channel)
Checks if this IStreamable supports the specified channel.

Parameters:
channel - The channel name to check.
Returns:
Return true if the channel is supported, false otherwise.