TIFFByteWriter

Objective-C

@interface TIFFByteWriter : NSObject

Swift

class TIFFByteWriter : NSObject

Write byte data

  • Next byte index to write

    Declaration

    Objective-C

    @property int nextByte;

    Swift

    var nextByte: Int32 { get set }
  • os

    Output stream to write bytes to

    Declaration

    Objective-C

    @property (nonatomic, strong) NSOutputStream *os;

    Swift

    var os: OutputStream! { get set }
  • Byte order used to write, little or big endian

    Declaration

    Objective-C

    @property (nonatomic) CFByteOrder byteOrder;

    Swift

    var byteOrder: CFByteOrder { get set }
  • Initialize

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()

    Return Value

    new byte writer

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithByteOrder:(CFByteOrder)byteOrder;

    Swift

    init!(byteOrder: CFByteOrder)

    Parameters

    byteOrder

    byte order

    Return Value

    new byte writer

  • Close the byte writer

    Declaration

    Objective-C

    - (void)close;

    Swift

    func close()
  • Get the written byte data

    Declaration

    Objective-C

    - (NSData *)data;

    Swift

    func data() -> Data!

    Return Value

    byte data

  • Get the current size in bytes written

    Declaration

    Objective-C

    - (int)size;

    Swift

    func size() -> Int32

    Return Value

    bytes written

  • Write a string

    Declaration

    Objective-C

    - (int)writeString:(NSString *)value;

    Swift

    func write(_ value: String!) -> Int32

    Parameters

    value

    string

    Return Value

    bytes written

  • Write a byte

    Declaration

    Objective-C

    - (void)writeNumberAsByte:(NSNumber *)value;

    Swift

    func writeNumber(asByte value: NSNumber!)

    Parameters

    value

    byte

  • Write a byte

    Declaration

    Objective-C

    - (void)writeByte:(char)value;

    Swift

    func writeByte(_ value: CChar)

    Parameters

    value

    byte

  • Write an unsigned byte

    Declaration

    Objective-C

    - (void)writeNumberAsUnsignedByte:(NSNumber *)value;

    Swift

    func writeNumber(asUnsignedByte value: NSNumber!)

    Parameters

    value

    unsigned byte as a short

  • Write an unsigned byte

    Declaration

    Objective-C

    - (void)writeUnsignedByte:(unsigned char)value;

    Swift

    func writeUnsignedByte(_ value: UInt8)

    Parameters

    value

    unsigned byte as a short

  • Write the bytes

    Declaration

    Objective-C

    - (void)writeBytesWithData:(NSData *)data;

    Swift

    func writeBytes(with data: Data!)

    Parameters

    data

    bytes

  • Write a short

    Declaration

    Objective-C

    - (void)writeNumberAsShort:(NSNumber *)value;

    Swift

    func writeNumber(asShort value: NSNumber!)

    Parameters

    value

    short

  • Write a short

    Declaration

    Objective-C

    - (void)writeShort:(short)value;

    Swift

    func writeShort(_ value: Int16)

    Parameters

    value

    short

  • Write an unsigned short

    Declaration

    Objective-C

    - (void)writeNumberAsUnsignedShort:(NSNumber *)value;

    Swift

    func writeNumber(asUnsignedShort value: NSNumber!)

    Parameters

    value

    unsigned short as an int

  • Write an unsigned short

    Declaration

    Objective-C

    - (void)writeUnsignedShort:(unsigned short)value;

    Swift

    func writeUnsignedShort(_ value: UInt16)

    Parameters

    value

    unsigned short as an int

  • Write an integer

    Declaration

    Objective-C

    - (void)writeNumberAsInt:(NSNumber *)value;

    Swift

    func writeNumber(asInt value: NSNumber!)

    Parameters

    value

    integer

  • Write an integer

    Declaration

    Objective-C

    - (void)writeInt:(int)value;

    Swift

    func write(_ value: Int32)

    Parameters

    value

    integer

  • Write an unsigned int

    Declaration

    Objective-C

    - (void)writeNumberAsUnsignedInt:(NSNumber *)value;

    Swift

    func writeNumber(asUnsignedInt value: NSNumber!)

    Parameters

    value

    unsigned int as long

  • Write an unsigned int

    Declaration

    Objective-C

    - (void)writeUnsignedInt:(unsigned int)value;

    Swift

    func writeUnsignedInt(_ value: UInt32)

    Parameters

    value

    unsigned int as long

  • Write a float

    Declaration

    Objective-C

    - (void)writeNumberAsFloat:(NSDecimalNumber *)value;

    Swift

    func writeNumber(asFloat value: NSDecimalNumber!)

    Parameters

    value

    float

  • Write a float

    Declaration

    Objective-C

    - (void)writeFloat:(float)value;

    Swift

    func write(_ value: Float)

    Parameters

    value

    float

  • Write a double

    Declaration

    Objective-C

    - (void)writeNumberAsDouble:(NSDecimalNumber *)value;

    Swift

    func writeNumber(asDouble value: NSDecimalNumber!)

    Parameters

    value

    double

  • Write a double

    Declaration

    Objective-C

    - (void)writeDouble:(double)value;

    Swift

    func write(_ value: Double)

    Parameters

    value

    double