TIFFIOUtils

Objective-C

@interface TIFFIOUtils : NSObject

/**
 *  Copy a file
 *
 *  @param copyFrom file to copy
 *  @param copyTo   file location to copy to
 */
+(void) copyFile: (NSString *) copyFrom toFile: (NSString *) copyTo;

/**
 *  Copy an input stream to a file
 *
 *  @param copyFrom input stream to copy
 *  @param copyTo   file location to copy to
 */
+(void) copyInputStream: (NSInputStream *) copyFrom toFile: (NSString *) copyTo;

/**
 *  Get the file byte data
 *
 *  @param file file path
 *
 *  @return byte data
 */
+(NSData *) fileData: (NSString *) file;

/**
 *  Get the input stream byte data
 *
 *  @param stream input stream
 *
 *  @return input stream byte data
 */
+(NSData *) streamData: (NSInputStream *) stream;

/**
 *  Copy the input stream to an output stream
 *
 *  @param copyFrom input stream
 *  @param copyTo   output stream
 */
+(void) copyInputStream: (NSInputStream *) copyFrom toOutputStream: (NSOutputStream *) copyTo;

@end

Swift

class TIFFIOUtils : NSObject

Undocumented

  • Copy a file

    Declaration

    Objective-C

    + (void)copyFile:(NSString *)copyFrom toFile:(NSString *)copyTo;

    Swift

    class func copyFile(_ copyFrom: String!, toFile copyTo: String!)

    Parameters

    copyFrom

    file to copy

    copyTo

    file location to copy to

  • Copy an input stream to a file

    Declaration

    Objective-C

    + (void)copyInputStream:(NSInputStream *)copyFrom toFile:(NSString *)copyTo;

    Swift

    class func copy(_ copyFrom: InputStream!, toFile copyTo: String!)

    Parameters

    copyFrom

    input stream to copy

    copyTo

    file location to copy to

  • Get the file byte data

    Declaration

    Objective-C

    + (NSData *)fileData:(NSString *)file;

    Swift

    class func fileData(_ file: String!) -> Data!

    Parameters

    file

    file path

    Return Value

    byte data

  • Get the input stream byte data

    Declaration

    Objective-C

    + (NSData *)streamData:(NSInputStream *)stream;

    Swift

    class func streamData(_ stream: InputStream!) -> Data!

    Parameters

    stream

    input stream

    Return Value

    input stream byte data

  • Copy the input stream to an output stream

    Declaration

    Objective-C

    + (void)copyInputStream:(NSInputStream *)copyFrom
             toOutputStream:(NSOutputStream *)copyTo;

    Swift

    class func copy(_ copyFrom: InputStream!, to copyTo: OutputStream!)

    Parameters

    copyFrom

    input stream

    copyTo

    output stream