Samond Classes Library 1.1.6-RELEASE build 132

SCFileStream Class Reference

File streams class. More...

#import <SCFileStream.h>

Inheritance diagram for SCFileStream:
SCStream SCObject <SCDictionaryObjectProtocol> <SCCodingProtocol> <SCStreamProtocol> <SCCollectionProtocol>

List of all members.

Public Member Functions

Initializing Stream
(id) - init
(id) - initWithDelegate:
(id) - initWithDelegate:path:mode:handling:
(id) - initWithDelegate:path:mode:
(id) - initWithPath:mode:handling:
(id) - initWithPath:mode:
(id) - initReadOnlyWithDelegate:path:handling:
(id) - initReadOnlyWithDelegate:path:
(id) - initReadOnlyWithPath:handling:
(id) - initReadOnlyWithPath:
(id) - initReadWriteWithDelegate:path:handling:
(id) - initReadWriteWithDelegate:path:
(id) - initReadWriteWithPath:handling:
(id) - initReadWriteWithPath:
(id) - initWriteOnlyWithDelegate:path:handling:
(id) - initWriteOnlyWithDelegate:path:
(id) - initWriteOnlyWithPath:handling:
(id) - initWriteOnlyWithPath:
(id) - initWriteReadWithDelegate:path:handling:
(id) - initWriteReadWithDelegate:path:
(id) - initWriteReadWithPath:handling:
(id) - initWriteReadWithPath:
(id) - initAppendWriteOnlyWithDelegate:path:handling:
(id) - initAppendWriteOnlyWithDelegate:path:
(id) - initAppendWriteOnlyWithPath:handling:
(id) - initAppendWriteOnlyWithPath:
(id) - initAppendReadWriteWithDelegate:path:handling:
(id) - initAppendReadWriteWithDelegate:path:
(id) - initAppendReadWriteWithPath:handling:
(id) - initAppendReadWriteWithPath:
Opening and Closing Stream
(void) - openWithPath:mode:handling:
(void) - openWithPath:mode:
(void) - openReadOnlyWithPath:handling:
(void) - openReadOnlyWithPath:
(void) - openReadWriteWithPath:handling:
(void) - openReadWriteWithPath:
(void) - openWriteOnlyWithPath:handling:
(void) - openWriteOnlyWithPath:
(void) - openWriteReadWithPath:handling:
(void) - openWriteReadWithPath:
(void) - openAppendWriteOnlyWithPath:handling:
(void) - openAppendWriteOnlyWithPath:
(void) - openAppendReadWriteWithPath:handling:
(void) - openAppendReadWriteWithPath:
(void) - close
Querying Stream Properties
(SCFileStreamOpenMode- openMode
Seeking Stream
(void) - setOffset:whence:
(void) - setOffset:
(SCLong- offset
(void) - rewind
(BOOL) - eof [implementation]
Reading and Writing Text Files
(NSString *) - readStringWithEncoding:max: [implementation]
(NSString *) - readStringWithEncoding: [implementation]
(NSString *) - readStringWithMax: [implementation]
(NSString *) - readString [implementation]
(void) - writeString:encoding: [implementation]
(void) - writeString: [implementation]

Static Public Member Functions

Creating Stream
(SCFileStream *) + stream
(SCFileStream *) + streamWithDelegate:
(SCFileStream *) + streamWithDelegate:path:mode:handling:
(SCFileStream *) + streamWithDelegate:path:mode:
(SCFileStream *) + streamWithPath:mode:handling:
(SCFileStream *) + streamWithPath:mode:
(SCFileStream *) + readOnlyStreamWithDelegate:path:handling:
(SCFileStream *) + readOnlyStreamWithDelegate:path:
(SCFileStream *) + readOnlyStreamWithPath:handling:
(SCFileStream *) + readOnlyStreamWithPath:
(SCFileStream *) + readWriteStreamWithDelegate:path:handling:
(SCFileStream *) + readWriteStreamWithDelegate:path:
(SCFileStream *) + readWriteStreamWithPath:handling:
(SCFileStream *) + readWriteStreamWithPath:
(SCFileStream *) + writeOnlyStreamWithDelegate:path:handling:
(SCFileStream *) + writeOnlyStreamWithDelegate:path:
(SCFileStream *) + writeOnlyStreamWithPath:handling:
(SCFileStream *) + writeOnlyStreamWithPath:
(SCFileStream *) + writeReadStreamWithDelegate:path:handling:
(SCFileStream *) + writeReadStreamWithDelegate:path:
(SCFileStream *) + writeReadStreamWithPath:handling:
(SCFileStream *) + writeReadStreamWithPath:
(SCFileStream *) + appendWriteOnlyStreamWithDelegate:path:handling:
(SCFileStream *) + appendWriteOnlyStreamWithDelegate:path:
(SCFileStream *) + appendWriteOnlyStreamWithPath:handling:
(SCFileStream *) + appendWriteOnlyStreamWithPath:
(SCFileStream *) + appendReadWriteStreamWithDelegate:path:handling:
(SCFileStream *) + appendReadWriteStreamWithDelegate:path:
(SCFileStream *) + appendReadWriteStreamWithPath:handling:
(SCFileStream *) + appendReadWriteStreamWithPath:

Detailed Description

File streams class.

Class is a concrete subclass of SCStream with support of files operations.
Class was introduced in version 1.1.3.

Class declares the following properties:


Member Function Documentation

+ (SCFileStream *) appendReadWriteStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Returns the opened for reading and writing the stream created by using the specified delegate object and path. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) appendReadWriteStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the opened for reading and writing the stream created by using the specified delegate object, path and error handling type. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) appendReadWriteStreamWithPath: (NSString *)  path

Returns the opened for reading and writing the stream created by using the specified path. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) appendReadWriteStreamWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the opened for reading and writing the stream created by using the specified path and error handling type. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) appendWriteOnlyStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Returns the opened for writing the stream created by using the specified delegate object and path. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) appendWriteOnlyStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the opened for writing the stream created by using the specified delegate object, path and error handling type. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) appendWriteOnlyStreamWithPath: (NSString *)  path

Returns the opened for writing the stream created by using the specified path. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) appendWriteOnlyStreamWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the opened for writing the stream created by using the specified path and error handling type. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) close

Closes the receiver's file stream.

- (BOOL) eof [implementation]

Determines end of stream flag.

Returns:
YES if end of stream detected, otherwise NO

Reimplemented from SCStream.

- (id) init

Initializes the stream using the default settings.

Returns:
A newly initialized stream

Reimplemented from SCStream.

- (id) initAppendReadWriteWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Initializes and opens for reading and writing the stream using the specified delegate object and path. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initAppendReadWriteWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and opens for reading and writing the stream using the specified delegate object, path and error handling type. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initAppendReadWriteWithPath: (NSString *)  path

Initializes and opens for reading and writing the stream using the specified path. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initAppendReadWriteWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and opens for reading and writing the stream using the specified path and error handling type. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initAppendWriteOnlyWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Initializes and opens for writing the stream using the specified delegate object and path. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initAppendWriteOnlyWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and opens for writing the stream using the specified delegate object, path and error handling type. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initAppendWriteOnlyWithPath: (NSString *)  path

Initializes and opens for writing the stream using the specified path. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initAppendWriteOnlyWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and opens for writing the stream using the specified path and error handling type. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initReadOnlyWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Initializes and opens for reading the stream using the specified delegate object and stream path. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initReadOnlyWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and opens for reading the stream using the specified delegate object, stream path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initReadOnlyWithPath: (NSString *)  path

Initializes and opens for reading the stream using the specified stream path. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initReadOnlyWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and opens for reading the stream using the specified stream path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initReadWriteWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Initializes and opens for reading and writing the stream using the specified delegate object and stream path. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initReadWriteWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and opens for reading and writing the stream using the specified delegate object, stream path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initReadWriteWithPath: (NSString *)  path

Initializes and opens for reading and writing the stream using the specified stream path. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initReadWriteWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and opens for reading and writing the stream using the specified stream path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWithDelegate: (id<SCStreamDelegate>)  delegate

Initializes the stream using the sp[ecified delegate object.

Returns:
A newly initialized stream
- (id) initWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
mode: (SCFileStreamOpenMode mode 

Initializes and opens the stream using the specified delegate object, stream path and open mode.

Parameters:
delegate- delegate object
path- stream file name
mode- open mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
mode: (SCFileStreamOpenMode mode
handling: (SCStreamErrorHandling handling 

Initializes and opens the stream using the specified delegate object, stream path, open mode and error handling type.

Parameters:
delegate- delegate object
path- stream file name
mode- open mode
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWithPath: (NSString *)  path
mode: (SCFileStreamOpenMode mode 

Initializes and opens the stream using the specified stream path and open mode.

Parameters:
path- stream file name
mode- open mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWithPath: (NSString *)  path
mode: (SCFileStreamOpenMode mode
handling: (SCStreamErrorHandling handling 

Initializes and opens the stream using the specified stream path, open mode and error handling type.

Parameters:
path- stream file name
mode- open mode
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWriteOnlyWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Initializes and truncates stream to zero length or creates stream for writing using the specified delegate object and path. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWriteOnlyWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and truncates stream to zero length or creates stream for writing using the specified delegate object, path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWriteOnlyWithPath: (NSString *)  path

Initializes and truncates stream to zero length or creates stream for writing using the specified path. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWriteOnlyWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and truncates stream to zero length or creates stream for writing using the specified path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWriteReadWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Initializes and opens for reading and writing the stream using the specified delegate object and path. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWriteReadWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and opens for reading and writing the stream using the specified delegate object, path and error handling type. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWriteReadWithPath: (NSString *)  path

Initializes and opens for reading and writing the stream using the specified path. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWriteReadWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Initializes and opens for reading and writing the stream using the specified path and error handling type. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A newly initialized and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (SCLong) offset

Returns the offset in bytes from the begin of the stream.

Returns:
Offset in bytes or -1 if error detected
Exceptions:
SCSystemException- system error detected
SCStreamException- stream operation error detected
- (void) openAppendReadWriteWithPath: (NSString *)  path

Open for reading and writing the stream usinf the specified path. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openAppendReadWriteWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Open for reading and writing the stream usinf the specified path and error handling type. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
handling- stream error handling mode
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openAppendWriteOnlyWithPath: (NSString *)  path

Open for writing the stream usinf the specified path. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openAppendWriteOnlyWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Open for writing the stream usinf the specified path and error handling type. The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening seek operations.

Parameters:
path- stream file name
handling- stream error handling mode
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (SCFileStreamOpenMode) openMode

Returns a file stream open mode.

Returns:
Open mode
- (void) openReadOnlyWithPath: (NSString *)  path

Open for reading the stream using the specified path. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openReadOnlyWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Open for reading the stream using the specified path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openReadWriteWithPath: (NSString *)  path

Open for reading and writing the stream using the specified path. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openReadWriteWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Open for reading and writing the stream using the specified path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openWithPath: (NSString *)  path
mode: (SCFileStreamOpenMode mode 

Opens the receiver's stream using the specified stream path and open mode.

Parameters:
path- stream file name
mode- open mode
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openWithPath: (NSString *)  path
mode: (SCFileStreamOpenMode mode
handling: (SCStreamErrorHandling handling 

Opens the receiver's stream using the specified stream path, open mode and error handling type.

Parameters:
path- stream file name
mode- open mode
handling- stream error handling mode
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openWriteOnlyWithPath: (NSString *)  path

Truncates stream to zero length or creates stream for writing using the specified path. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openWriteOnlyWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Truncates stream to zero length or creates stream for writing using the specified path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openWriteReadWithPath: (NSString *)  path

Open for reading and writing the stream using the specified path. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) openWriteReadWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Open for reading and writing the stream using the specified path and error handling type. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) readOnlyStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Returns the opened for reading stream created by using the specified delegate object and stream path. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) readOnlyStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the opened for reading stream created by using the specified delegate object, stream path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) readOnlyStreamWithPath: (NSString *)  path

Returns the opened for reading stream created by using the specified stream path. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) readOnlyStreamWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the opened for reading stream created by using the specified stream path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (NSString *) readString [implementation]

Returns the string readed by using the UTF-8 encoding.

Returns:
String or nul if error or end of stream detected
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected

Reimplemented from SCStream.

- (NSString *) readStringWithEncoding: (NSStringEncoding)  encoding [implementation]

Returns the string readed by using the specified encoding.

Parameters:
encoding- string encoding
Returns:
String or nul if error or end of stream detected
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected

Reimplemented from SCStream.

- (NSString *) readStringWithEncoding: (NSStringEncoding)  encoding
max: (SCUInteger max 
[implementation]

Returns the string with the specified max length and readed by using the specified encoding.

Parameters:
encoding- string encoding
max- max length
Returns:
String or nul if error or end of stream detected
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected

Reimplemented from SCStream.

- (NSString *) readStringWithMax: (SCUInteger max [implementation]

Returns the string with the specified max length and readed by using the UTF-8 encoding.

Parameters:
max- max length
Returns:
String or nul if error or end of stream detected
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected

Reimplemented from SCStream.

+ (SCFileStream *) readWriteStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Returns the opened for reading and writing stream created by using the specified delegate object and stream path. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) readWriteStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the opened for reading and writing stream created by using the specified delegate object, stream path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) readWriteStreamWithPath: (NSString *)  path

Returns the opened for reading and writing stream created by using the specified stream path. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) readWriteStreamWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the opened for reading and writing stream created by using the specified stream path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) rewind

Sets the position to the begin of the file stream.

Exceptions:
SCStreamException- stream not open error detected
- (void) setOffset: (SCLong offset

Sets the stream position to the specified offset from the begin of the stream.

Parameters:
offset- stream offset
Exceptions:
SCSystemException- system error detected
SCStreamException- stream operation error detected
- (void) setOffset: (SCLong offset
whence: (SCFileStreamOffsetWhence whence 

Sets the stream position to the specified offset and whence.

Parameters:
offset- stream offset
whence- offset whence
Exceptions:
SCSystemException- system error detected
SCStreamException- stream operation error detected
+ (SCFileStream *) stream

Returns the stream created by using the default settings.

Returns:
A created stream
+ (SCFileStream *) streamWithDelegate: (id<SCStreamDelegate>)  delegate

Returns the stream created by using the specified delegate object.

Parameters:
delegate- delegate object
Returns:
A created stream
+ (SCFileStream *) streamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
mode: (SCFileStreamOpenMode mode 

Returns the opened stream created by using the specified delegate object, stream path and open mode.

Parameters:
delegate- delegate object
path- stream file name
mode- open mode
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) streamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
mode: (SCFileStreamOpenMode mode
handling: (SCStreamErrorHandling handling 

Returns the opened stream created by using the specified delegate object, stream path, open mode and error handling type.

Parameters:
delegate- delegate object
path- stream file name
mode- open mode
handling- stream error handling mode
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) streamWithPath: (NSString *)  path
mode: (SCFileStreamOpenMode mode 

Returns the opened stream created by using the specified stream path and open mode.

Parameters:
path- stream file name
mode- open mode
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) streamWithPath: (NSString *)  path
mode: (SCFileStreamOpenMode mode
handling: (SCStreamErrorHandling handling 

Returns the opened stream created by using the specified stream path, open mode and error handling type.

Parameters:
path- stream file name
mode- open mode
handling- stream error handling mode
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) writeOnlyStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Returns the stream truncated to zero length or created for writing. Stream was created by using the specified delegate object and path. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) writeOnlyStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the stream truncated to zero length or created for writing. Stream was created by using the specified delegate object, path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) writeOnlyStreamWithPath: (NSString *)  path

Returns the stream truncated to zero length or created for writing. Stream was created by using the specified path. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) writeOnlyStreamWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the stream truncated to zero length or created for writing. Stream was created by using the specified path and error handling type. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A created opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) writeReadStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path 

Returns the opened for writing and reading stream created by usin the specified delegate object and path. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) writeReadStreamWithDelegate: (id<SCStreamDelegate>)  delegate
path: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the opened for writing and reading stream created by usin the specified delegate object, path and error handling type. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

Parameters:
delegate- delegate object
path- stream file name
handling- stream error handling mode
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) writeReadStreamWithPath: (NSString *)  path

Returns the opened for writing and reading stream created by usin the specified path. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCFileStream *) writeReadStreamWithPath: (NSString *)  path
handling: (SCStreamErrorHandling handling 

Returns the opened for writing and reading stream created by usin the specified path and error handling type. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

Parameters:
path- stream file name
handling- stream error handling mode
Returns:
A created and opened stream
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) writeString: (NSString *)  string [implementation]

Writes into the stream the specified UTF-8 text string with end of line character.

Parameters:
string- writed string
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected

Reimplemented from SCStream.

- (void) writeString: (NSString *)  string
encoding: (NSStringEncoding)  encoding 
[implementation]

Writes into the stream the specified text string with the specified encoding end of line character.

Parameters:
string- writed string
encoding- string encoding
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected

Reimplemented from SCStream.


The documentation for this class was generated from the following files:
 All Classes Files Functions Typedefs Enumerations Enumerator Defines