| Interface | osid.transport.DataInputStream | ||
|---|---|---|---|
| Description |
The data input stream provides a means for reading data from a stream. | ||
| Method | atEndOfStream | ||
| 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. | ||
| Return | boolean | true if the end of this stream has been reached,
false otherwise | |
| Errors | ILLEGAL_STATE | this stream has been closed | |
| Compliance | mandatory | This method must be implemented. | |
| Method | available | ||
| Description |
Gets the number of | ||
| Return | cardinal | the number of bytes available for retrieval | |
| Errors | ILLEGAL_STATE | this stream has been closed | |
| Compliance | mandatory | This method must be implemented. | |
| Method | skip | ||
| Description |
Skips a specified number of | ||
| Parameters | cardinal | n | the number of bytes to skip |
| Return | cardinal | the actual number of bytes skipped | |
| Errors | ILLEGAL_STATE | this stream has been closed or atEndOfStream() is
true | |
| Compliance | mandatory | This method must be implemented. | |
| Method | read | ||
| Description |
Reads a specified number of | ||
| Parameters | byte[] | buf | the buffer in which the data is read |
cardinal | n | the number of bytes to read | |
| Return | integer | the actual number of bytes read | |
| Errors | ILLEGAL_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 | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | close | ||
| Description |
Closes this stream and frees up any allocated resources. Methods in this object may not be invoked after this method is called. | ||
| Errors | ILLEGAL_STATE | this stream has been closed | |
| Compliance | mandatory | This method must be implemented. | |