public class NSMutableData extends NSData
Constructor and Description |
---|
NSMutableData(int size)
Constructs a NSMutableData object of the specified size.
|
Modifier and Type | Method and Description |
---|---|
void |
appendBytes(byte[] bytes)
Attaches the specified data of the buffer to this object.
|
void |
appendData(NSData data)
Attaches the specified data to this object.
|
static NSMutableData |
dataWithBytes(byte[] data)
Constructs and returns a NSMutableData object with the specified bytes of
data copied from the buffer.
|
static NSMutableData |
dataWithBytesNoCopy(byte[] data)
Constructs and returns an NSMutableData object with the specified bytes
of data from the buffer.
|
static NSMutableData |
dataWithContentsOfFile(String path)
Constructs and returns a NSMutableData object with the data of the
specified file path.
|
static NSMutableData |
dataWithContentsOfURL(NSURL url)
Constructs and returns a NSMutableData object with the data of the
specified URL.
|
void |
setData(NSData data)
Replaces the data of this object with the given data.
|
base64EncodedStringWithOptions, bytes, length, toString, writeToFile
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
supportsSecureCoding
public NSMutableData(int size)
size
- The size of the new NSMutableData object.public static NSMutableData dataWithBytes(byte[] data)
data
- The bytes of the buffer.public static NSMutableData dataWithBytesNoCopy(byte[] data)
data
- The bytes of the buffer.public static NSMutableData dataWithContentsOfFile(String path)
path
- The file that contains the data of the new object.public static NSMutableData dataWithContentsOfURL(NSURL url)
url
- The URL that has the data of the new object.public void appendBytes(byte[] bytes)
bytes
- The data of the buffer to attach to this object.public void appendData(NSData data)
data
- The data to attach to this object.public void setData(NSData data)
data
- The new data of this object.Copyright © 2020. All rights reserved.