OSID Logo
OSID Specifications
transport package
Version 3.1.0
Interfaceosid.transport.DataInputStream
Used Byosid.filing.FileContentSession
osid.installation.InstallationContent
osid.repository.AssetContent
osid.transport.OutboundStreamSession
Description

The data input stream provides a means for reading data from a stream.

MethodatEndOfStream
Description

Tests if the end of this stream has been reached. This may not be a permanent condition as more data may be available at a later time as in the case of tailing a file.

Returnboolean true if the end of this stream has been reached, false otherwise
ErrorsILLEGAL_STATE this stream has been closed
Compliancemandatory This method must be implemented.
Methodavailable
Description

Gets the number of bytes available for retrieval. The number returned by this method may be less than or equal to the total number of bytes in this stream.

Returncardinal the number of bytes available for retrieval
ErrorsILLEGAL_STATE this stream has been closed
Compliancemandatory This method must be implemented.
Methodskip
Description

Skips a specified number of bytes in the stream.

Parameterscardinaln the number of bytes to skip
Returncardinal the actual number of bytes skipped
ErrorsILLEGAL_STATE this stream has been closed or atEndOfStream() is true
Compliancemandatory This method must be implemented.
Methodread
Description

Reads a specified number of bytes from this stream.

Parametersbyte[]buf the buffer in which the data is read
cardinaln the number of bytes to read
Returninteger the actual number of bytes read
ErrorsILLEGAL_STATE this stream has been closed or atEndOfStream() is true
INVALID_ARGUMENT the size of buf is less than n
NULL_ARGUMENT buf is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
Methodclose
Description

Closes this stream and frees up any allocated resources. Methods in this object may not be invoked after this method is called.

ErrorsILLEGAL_STATE this stream has been closed
Compliancemandatory This method must be implemented.