ElectroServer 5 Client: Cocoa-Touch
EsObject Class Reference
Inheritance diagram for EsObject:

Instance Methods

(NSData *) - data
 
(int) - count
 
(BOOL) - containsKey:
 
(void) - addAll:
 
(EsObject *) - shallowClone
 
(EsObject *) - deepClone
 
(NSString *) - stringWithKey:
 
(void) - setString:forKey:
 
(NSArray *) - stringArrayWithKey:
 
(void) - setStringArray:forKey:
 
(double) - doubleWithKey:
 
(void) - setDouble:forKey:
 
(int32_t) - intWithKey:
 
(void) - setInt:forKey:
 
(NSArray *) - intArrayWithKey:
 
(void) - setIntArray:forKey:
 
(BOOL) - boolWithKey:
 
(void) - setBool:forKey:
 
(NSArray *) - boolArrayWithKey:
 
(void) - setBoolArray:forKey:
 
(uint8_t) - byteWithKey:
 
(void) - setByte:forKey:
 
(NSData *) - byteArrayWithKey:
 
(void) - setByteArray:forKey:
 
(float) - floatWithKey:
 
(void) - setFloat:forKey:
 
(NSArray *) - floatArrayWithKey:
 
(void) - setFloatArray:forKey:
 
(int16_t) - shortWithKey:
 
(void) - setShort:forKey:
 
(EsObject *) - esObjectWithKey:
 
(void) - setEsObject:forKey:
 
(NSArray *) - esObjectArrayWithKey:
 
(void) - setEsObjectArray:forKey:
 
(NSEnumerator *) - enumerator
 
(NSArray *) - keys
 
(id) - valueForKey:
 

Class Methods

(EsObject *) + esObjectFromData:
 
(void) + writeBool:toStream:
 
(void) + writeBoolArray:toStream:
 
(void) + writeByte:toStream:
 
(void) + writeByteArray:toStream:
 
(void) + writeFloat:toStream:
 
(void) + writeFloatArray:toStream:
 
(void) + writeDouble:toStream:
 
(void) + writeInt:toStream:
 
(void) + writeIntArray:toStream:
 
(void) + writeShort:toStream:
 
(void) + writeString:toStream:
 
(void) + writeStringArray:toStream:
 
(void) + writeEsObject:toStream:
 
(void) + writeEsObjectArray:toStream:
 
(void) + writeLength:toStream:
 Length is encoded as either 1, 2 3 or 4 bytes. More...
 
(BOOL) + readBoolFromStream:
 
(NSArray *) + readBoolArrayFromStream:
 
(uint8_t) + readByteFromStream:
 
(NSData *) + readByteArrayFromStream:
 
(float) + readFloatFromStream:
 
(NSArray *) + readFloatArrayFromStream:
 
(double) + readDoubleFromStream:
 
(int32_t) + readIntFromStream:
 
(NSArray *) + readIntArrayFromStream:
 
(int16_t) + readShortFromStream:
 
(NSString *) + readStringFromStream:
 
(NSArray *) + readStringArrayFromStream:
 
(EsObject *) + readEsObjectFromStream:
 
(NSArray *) + readEsObjectArrayFromStream:
 
(int64_t) + readLongFromStream:
 
(int) + readLengthFromStream:
 Length is encoded as either 1, 2 3 or 4 bytes. More...
 
(NSString *) + hexDumpForData:
 
(NSString *) + hexDumpForBytes:offset:length:
 

Method Documentation

- (void) addAll: (EsObject*)  object
- (NSArray *) boolArrayWithKey: (NSString*)  key
- (BOOL) boolWithKey: (NSString*)  key
- (NSData *) byteArrayWithKey: (NSString*)  key
- (uint8_t) byteWithKey: (NSString*)  key
- (BOOL) containsKey: (NSString*)  key
- (int) count
- (NSData *) data
- (EsObject *) deepClone
- (double) doubleWithKey: (NSString*)  key
- (NSEnumerator *) enumerator
- (NSArray *) esObjectArrayWithKey: (NSString*)  key
+ (EsObject *) esObjectFromData: (NSData*)  data
- (EsObject *) esObjectWithKey: (NSString*)  key
- (NSArray *) floatArrayWithKey: (NSString*)  key
- (float) floatWithKey: (NSString*)  key
+ (NSString *) hexDumpForBytes: (uint8_t*)  bytes
offset: (int)  offset
length: (int)  length 
+ (NSString *) hexDumpForData: (NSData*)  data
- (NSArray *) intArrayWithKey: (NSString*)  key
- (int32_t) intWithKey: (NSString*)  key
- (NSArray *) keys
+ (NSArray *) readBoolArrayFromStream: (NSInputStream*)  stream
+ (BOOL) readBoolFromStream: (NSInputStream*)  stream
+ (NSData *) readByteArrayFromStream: (NSInputStream*)  stream
+ (uint8_t) readByteFromStream: (NSInputStream*)  stream
+ (double) readDoubleFromStream: (NSInputStream*)  stream
+ (NSArray *) readEsObjectArrayFromStream: (NSInputStream*)  stream
+ (EsObject *) readEsObjectFromStream: (NSInputStream*)  stream
+ (NSArray *) readFloatArrayFromStream: (NSInputStream*)  stream
+ (float) readFloatFromStream: (NSInputStream*)  stream
+ (NSArray *) readIntArrayFromStream: (NSInputStream*)  stream
+ (int32_t) readIntFromStream: (NSInputStream*)  stream
+ (int) readLengthFromStream: (NSInputStream*)  stream

Length is encoded as either 1, 2 3 or 4 bytes.

The 2 most significant bits of the first byte contain the length in bytes of the field and then value encoding starts immediately with the next 6 bits. The field is encoded big endian. This scheme gives the following maximums per byte count: 1 = 63 2 = 16,383 3 = 4,194,303 4 = 1,073,741,823 Values larger than 1,073,741,823 will result in an Error being thrown.

Parameters
length
Returns
+ (int64_t) readLongFromStream: (NSInputStream*)  stream
+ (int16_t) readShortFromStream: (NSInputStream*)  stream
+ (NSArray *) readStringArrayFromStream: (NSInputStream*)  stream
+ (NSString *) readStringFromStream: (NSInputStream*)  stream
- (void) setBool: (BOOL)  val
forKey: (NSString*)  key 
- (void) setBoolArray: (NSArray*)  aVal
forKey: (NSString*)  key 
- (void) setByte: (uint8_t)  val
forKey: (NSString*)  key 
- (void) setByteArray: (NSData*)  aVal
forKey: (NSString*)  key 
- (void) setDouble: (double)  val
forKey: (NSString*)  key 
- (void) setEsObject: (EsObject*)  val
forKey: (NSString*)  key 
- (void) setEsObjectArray: (NSArray*)  aVal
forKey: (NSString*)  key 
- (void) setFloat: (float)  val
forKey: (NSString*)  key 
- (void) setFloatArray: (NSArray*)  aVal
forKey: (NSString*)  key 
- (void) setInt: (int32_t)  val
forKey: (NSString*)  key 
- (void) setIntArray: (NSArray*)  aVal
forKey: (NSString*)  key 
- (void) setShort: (int16_t)  val
forKey: (NSString*)  key 
- (void) setString: (NSString*)  val
forKey: (NSString*)  key 
- (void) setStringArray: (NSArray*)  aVal
forKey: (NSString*)  key 
- (EsObject *) shallowClone
- (int16_t) shortWithKey: (NSString*)  key
- (NSArray *) stringArrayWithKey: (NSString*)  key
- (NSString *) stringWithKey: (NSString*)  key
- (id) valueForKey: (NSString*)  key
+ (void) writeBool: (BOOL)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeBoolArray: (NSArray*)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeByte: (uint8_t)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeByteArray: (NSData*)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeDouble: (double)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeEsObject: (EsObject*)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeEsObjectArray: (NSArray*)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeFloat: (float)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeFloatArray: (NSArray*)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeInt: (int32_t)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeIntArray: (NSArray*)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeLength: (int)  length
toStream: (NSOutputStream*)  stream 

Length is encoded as either 1, 2 3 or 4 bytes.

The 2 most significant bits of the first byte contain the length in bytes of the field and then value encoding starts immediately with the next 6 bits. The field is encoded big endian. This scheme gives the following maximums per byte count: 1 = 63 2 = 16,383 3 = 4,194,303 4 = 1,073,741,823 Values larger than 1,073,741,823 will result in an Error being thrown.

Parameters
length
Returns
+ (void) writeShort: (int16_t)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeString: (NSString*)  val
toStream: (NSOutputStream*)  stream 
+ (void) writeStringArray: (NSArray*)  val
toStream: (NSOutputStream*)  stream