Abstract parent class of the stream classes hierarchy.
More...
#import <SCStream.h>
Abstract parent class of the stream classes hierarchy.
- SDK
- macOS 10.6+, iOS 7.0+, GNUstep
- Since
- version 1.1.3
Declares the methods for stream operations support.
Class instances can thrown the following exceptions:
We are planning the following child classes and utilities:
- Todo:
SCZeroStream - zero data input stream (/dev/zero)
SCRandomStream - randomized data input stream (/dev/random)
SCMemoryStream - memory stream class
SCSharedMemoryStream - shared memory (SHMMEM) stream class
File stream viewing utilities
Reads from the receiving stream and returns the boolean value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
Reads from the receiving stream and returns the signed 8-bit integer value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
- (SCSize) readBytes: |
|
(SCSize) |
count |
toBuffer: |
|
(void *) |
buffer |
|
|
| |
Reads a given number of characters into the specified buffer.
- Parameters
-
count | - the number of the characters to read from the stream |
buffer | - the pointer to the receiving data buffer |
- Returns
- An actually readed number of characters
- Exceptions
-
Reimplemented in SCFileStream.
Reads from the receiving stream and returns the character.
- Returns
- Character which readed from the receiving stream
- Exceptions
-
- See also
- - readUnichar
- (const char *) readCharString |
|
|
|
Reads from the receiving stream and returns the character string.
- Returns
- Character string which readed from the receiving stream
- Exceptions
-
Reads from the receiving stream and returns the double value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
Reads from the receiving stream and returns the float value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
Reads from the receiving stream and returns the signed 32-bit integer value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
Reads from the receiving stream and returns the signed 64-bit integer value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
- (NSInteger) readNSInteger |
|
|
|
Reads from the receiving stream and returns the NSInteger value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
- (NSUInteger) readNSUInteger |
|
|
|
Reads from the receiving stream and returns the NSUInteger value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
Initializes and returns class instance from the receiving stream.
- Returns
- A newly initialized class instance or nil if the error is detected
- Exceptions
-
Reads from the receiving stream and returns the signed 16-bit integer value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
- (NSString *) readString |
|
|
|
Reads from the receiving stream and returns the string by using the UTF-8 encoding.
- Returns
- String which will be readed from the receiving stream or nil if the error is detected
- Exceptions
-
- (NSString *) readStringWithEncoding: |
|
(NSStringEncoding) |
encoding |
|
Reads from the receiving stream and returns the string by using the specified encoding.
- Parameters
-
encoding | - the string encoding to read string from the receiving stream |
- Returns
- String which will be readed from the receiving stream or nil if the error is detected
- Exceptions
-
Reads from the receiving stream and returns the string with the specified maximum length by using a given encoding.
- Parameters
-
encoding | - the string encoding to read string from the receiving stream |
max | - the maximum length of the string |
- Returns
- String which will be readed from the receiving stream or nil if the error is detected
- Exceptions
-
- (NSString *) readStringWithMax: |
|
(SCInteger) |
max |
|
Reads from the receiving stream and returns the string with the specified maximum length by using the UTF-8 encoding.
- Parameters
-
max | - the maximum length of the string |
- Returns
- String which will be readed from the receiving stream or nil if the error is detected
- Exceptions
-
- (SCSize) readToBool: |
|
(BOOL *) |
buffer |
|
Reads from the receiving stream the boolean value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
Reads from the receiving stream the signed 8-bit integer value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
- (SCSize) readToChar: |
|
(char *) |
buffer |
|
Reads from the receiving stream the character into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
- See also
- - readToUnichar:
- (SCSize) readToCharString: |
|
(char *) |
buffer |
max: |
|
(SCSize) |
max |
|
|
| |
Reads from the receiving stream the character string into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
max | - the maximum number of characters to read from the stream |
- Returns
- Number of the actually readed characters
- Exceptions
-
Reads from the receiving stream the double value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
Reads from the receiving stream the float value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
Reads from the receiving stream the signed 32-bit integer value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
Reads from the receiving stream the signed 64-bit integer value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
- (SCSize) readToNSInteger: |
|
(NSInteger *) |
buffer |
|
Reads from the receiving stream the NSInteger value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
- (SCSize) readToNSUInteger: |
|
(NSUInteger *) |
buffer |
|
Reads from the receiving stream the NSUInteger value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
Reads from the receiving stream the signed 16-bit integer value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
Reads from the receiving stream the unsigned 8-bit integer value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
Reads from the receiving stream the unsigned 32-bit integer value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
Reads from the receiving stream the unsigned 64-bit integer value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
- (SCSize) readToUnichar: |
|
(unichar *) |
buffer |
|
Reads from the receiving stream the character into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
- See also
- - readToChar:
Reads from the receiving stream the unsigned 16-bit integer value into the specified buffer.
- Parameters
-
buffer | - the pointer to the buffer for the reading data |
- Returns
- Number of the actually readed characters
- Exceptions
-
Reads from the receiving stream and returns the unsigned 8-bit integer value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
Reads from the receiving stream and returns the unsigned 32-bit integer value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
Reads from the receiving stream and returns the unsigned 64-bit integer value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
Reads from the receiving stream and returns the character.
- Returns
- Character which readed from the receiving stream
- Exceptions
-
- See also
- - readChar
Reads from the receiving stream and returns the unsigned 16-bit integer value.
- Returns
- Value which readed from the receiving stream
- Exceptions
-
Resets the stream statistic.
- (void) writeBool: |
|
(BOOL) |
variable |
|
Writes to the receiving stream the specified boolean value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
- (void) writeByte: |
|
(SCByte) |
variable |
|
Writes to the receiving stream the specified signed 8-bit integer value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
- (SCSize) writeBytes: |
|
(SCSize) |
count |
fromBuffer: |
|
(const void *) |
buffer |
|
|
| |
Writes to the receiving stream the specified number of characters from the specified data buffer.
- Parameters
-
count | - the number of characters to write to the receiving stream |
buffer | - the pointer to the buffer with the data to write to the receiving stream |
- Returns
- A number of the actually writed into the stream characters
- Exceptions
-
Reimplemented in SCFileStream.
- (void) writeChar: |
|
(char) |
variable |
|
Writes to the receiving stream the specified character.
- Parameters
-
variable | - the character to write to the receiving stream |
- Exceptions
-
- See also
- - writeUnichar:
- (void) writeCharString: |
|
(const char *) |
variable |
|
Writes to the receiving stream the specified character string.
- Parameters
-
variable | - the character string to write to the receiving stream |
- Exceptions
-
- (void) writeDouble: |
|
(SCDouble) |
variable |
|
Writes to the receiving stream the specified double value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
- (void) writeFloat: |
|
(SCFloat) |
variable |
|
Writes to the receiving stream the specified float value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
Writes to the receiving stream the specified signed 32-bit integer value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
- (void) writeLong: |
|
(SCLong) |
variable |
|
Writes to the receiving stream the specified signed 64-bit integer value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
- (void) writeNSInteger: |
|
(NSInteger) |
variable |
|
Writes to the receiving stream the specified NSInteger value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
- (void) writeNSUInteger: |
|
(NSUInteger) |
variable |
|
Writes to the receiving stream the specified NSUInteger value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
Writes to the receiving stream the specified class instance.
- Parameters
-
object | - the class instance to write to the receiving stream |
- Exceptions
-
- (void) writeShort: |
|
(SCShort) |
variable |
|
Writes to the receiving stream the specified signed 16-bit integer value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
- (void) writeString: |
|
(NSString *) |
string |
|
Writes to the receiving stream the specified string by using the UTF-8 encoding.
- Parameters
-
string | - the string to write to the receiving stream |
- Exceptions
-
- (void) writeString: |
|
(NSString *) |
string |
encoding: |
|
(NSStringEncoding) |
encoding |
|
|
| |
Writes to the receiving stream the specified string by using a given encoding.
- Parameters
-
string | - the string to write to the receiving stream |
encoding | - the string encoding to write string to the receiving stream |
- Exceptions
-
- (void) writeUByte: |
|
(SCUByte) |
variable |
|
Writes to the receiving stream the specified unsigned 8-bit integer value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
Writes to the receiving stream the specified unsigned 32-bit integer value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
- (void) writeULong: |
|
(SCULong) |
variable |
|
Writes to the receiving stream the specified unsigned 64-bit integer value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
- (void) writeUnichar: |
|
(unichar) |
variable |
|
Writes to the receiving stream the specified character.
- Parameters
-
variable | - the character to write to the receiving stream |
- Exceptions
-
- See also
- - writeChar:
- (void) writeUShort: |
|
(SCUShort) |
variable |
|
Writes to the receiving stream the specified unsigned 16-bit integer value.
- Parameters
-
variable | - the value to write to the receiving stream |
- Exceptions
-
Flag determines the end of the stream
Number of the readed characters during the last operation
Number of the writed characters during the last operation
Pointer to the current readed object
Stream opening flag: YES if the stream is opened and NO if the stream is closed
Flag determines the ability to read from the stream
Flag determines whether the stream is read only
Flag determines whether the stream supports both read and write operations
Last detected stream exception
Last detected system exception
Number of the totally readed characters
Number of the totally writed characters
Flag determines the ability to write to the stream
Flag determines whether the stream is write only
The documentation for this class was generated from the following files: