com.novell.java.io
Interface DataAccessable


public interface DataAccessable

Provides an object that may support input/output streams and random access to data.

The DataAccessable object may have container capabilities that support subordinate access, or it may support access only to itself. The various methods of this interface report if the device supports access to itself or if the device supports subordinate access.

The constructors of the NInputStream, NOutputStream and RandomAccess classes (or provider specific extensions of these classes) all take a DataAccessable object as a parameter, and then implement themselves in terms of this input parameter. The constructors that have a name parameter (that must be atomic) will attempt to open a subordinate stream through the given DataAccessable object. The constructors without a name parameter attempt to open a stream on the given DataAcessable object itself.

See Also:
NInputStream, NOutputStream, RandomAccess

Method Summary
 boolean supportsInputStream()
          Reports if this accessor supports input stream.
 boolean supportsOutputStream()
          Reports if this accessor supports output stream.
 boolean supportsRandomAccess()
          Reports if this accessor supports random access.
 boolean supportsSubordinateInputStream()
          Reports if this accessor supports subordinate input streams.
 boolean supportsSubordinateOutputStream()
          Reports if this accessor supports subordinate output streams.
 boolean supportsSubordinateRandomAccess()
          Reports if this accessor supports subordinate random access.
 

Method Detail

supportsRandomAccess

public boolean supportsRandomAccess()
Reports if this accessor supports random access.

If this DataAccessable object supports random access on itself as the default action (no custom parameters), this method returns TRUE; otherwise FALSE is returned.

Returns:
A boolean set to TRUE if random access is valid for this accessor; otherwise FALSE is returned.
See Also:
RandomAccessNotSupportedException, SubordinateAccessOnlyException

supportsInputStream

public boolean supportsInputStream()
Reports if this accessor supports input stream.

If this DataAccessable object supports input stream on itself as the default action (no custom parameters), this method returns TRUE; otherwise FALSE is returned.

Returns:
A boolean set to TRUE if input stream is valid for this accessor; otherwise FALSE is returned.
See Also:
InputStreamNotSupportedException, SubordinateAccessOnlyException

supportsOutputStream

public boolean supportsOutputStream()
Reports if this accessor supports output stream.

If this DataAccessable object supports output stream on itself as the default action (no custom parameters), this method returns TRUE; otherwise FALSE is returned.

Returns:
A boolean set to TRUE if input stream is valid for this accessor; otherwise FALSE is returned.
See Also:
OutputStreamNotSupportedException, SubordinateAccessOnlyException

supportsSubordinateRandomAccess

public boolean supportsSubordinateRandomAccess()
Reports if this accessor supports subordinate random access.

If this DataAccessable object supports subordinate random access as the default action (no custom parameters), this method returns TRUE; otherwise FALSE is returned.

Returns:
A boolean set to TRUE if input stream is valid for this accessor; otherwise FALSE is returned.
See Also:
RandomAccessNotSupportedException, NoSubordinateAccessException

supportsSubordinateInputStream

public boolean supportsSubordinateInputStream()
Reports if this accessor supports subordinate input streams.

If this DataAccessable object supports subordinate input streams as the default action (no custom parameters), this method returns TRUE; otherwise FALSE is returned.

Returns:
A boolean set to TRUE if input stream is valid for this accessor; otherwise FALSE is returned.
See Also:
InputStreamNotSupportedException, NoSubordinateAccessException

supportsSubordinateOutputStream

public boolean supportsSubordinateOutputStream()
Reports if this accessor supports subordinate output streams.

If this DataAccessable object supports subordinate output streams as the default action (no custom parameters), this method returns TRUE; otherwise FALSE is returned.

Returns:
A boolean set to TRUE if input stream is valid for this accessor; otherwise FALSE is returned.
See Also:
OutputStreamNotSupportedException, NoSubordinateAccessException