mccallum@gnu.ai.mit.edu
)richard@brainstorm.co.uk
)Version: 1.143
Date: 2004/01/30 11:30:56
Copyright: (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
- Declared in:
- Foundation/NSData.h
- Conforms to:
- NSCoding
- NSCopying
- NSMutableCopying
Standards:
- MacOS-X
- OpenStep
- GNUstep
Description forthcoming.
Method summaryReturns an empty data object.
Returns an autoreleased data object containing data copied from bytes and with the specified length. Invokes -initWithBytes:length:
Returns an autoreleased data object encapsulating
the data at bytes and with the specified
length. Invokes
-initWithBytesNoCopy:length:freeWhenDone:
with YES
Returns an autoreleased data object encapsulating the data at bytes and with the specified length. Invokes -initWithBytesNoCopy:length:freeWhenDone:
Returns a data object encapsulating the contents of the specified file. Invokes -initWithContentsOfFile:
Returns a data object encapsulating the contents of the specified file mapped directly into memory. Invokes -initWithContentsOfMappedFile:
Retrieves the information at the specified url and returns an NSData instance encapsulating it.
Returns an autoreleased instance initialised by copying the contents of data.
Returns a pointer to the data encapsulated by the receiver.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Copies the contents of the memory encapsulated by
the receiver into the specified buffer. The
buffer must be large enough to contain
-length
bytes of data... if it isn't then a crash is likely
to occur.
Invokes
-getBytes:range:
with the range set to the whole of the receiver.
Copies length bytes of data from the
memory encapsulated by the receiver into the
specified buffer. The
buffer must be large enough to contain
length bytes of data... if it isn't then a
crash is likely to occur.
Invokes
-getBytes:range:
with the range set to iNSMakeRange(0,
length)
Copies data from the memory encapsulated by the
receiver (in the range specified by
aRange) into the specified
buffer.
The buffer must
be large enough to contain the data... if it isn't then
a crash is likely to occur.
If aRange
specifies a range which does not entirely lie
within the receiver, an exception is raised.
Makes a copy of bufferSize bytes of data
at aBuffer, and passes it to
-initWithBytesNoCopy:length:freeWhenDone:
with a YES
argument in order to initialise the receiver. Returns the result.
Invokes
-initWithBytesNoCopy:length:freeWhenDone:
with the last argument set to YES
. Returns the resulting initialised data object (which may not be the receiver).
Initialises the receiver.
The value of
aBuffer is a pointer to something to be
stored.
The value of bufferSize
is the number of bytes to use.
The value of
shouldFree specifies whether the receiver
should attempt to free the memory pointer to by
aBuffer when the receiver is deallocated
... ie. it says whether the receiver owns the
memory. Supplying the wrong value here will lead to
memory leaks or crashes.
Initialises the receiver with the contents of
the specified file.
Returns the resulting
object.
Returns nil
if the file
does not exist or can not be read for some reason.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Returns a boolean value indicating if the receiver and other contain identical data (using a byte by byte comparison). Assumes that the other object is an NSData instance... may raise an exception if it isn't.
Returns the number of bytes of data encapsulated by the receiver.
Returns an NSData instance encapsulating the memory
from the reciever specified by the range
aRange.
If aRange
specifies a range which does not entirely lie
within the receiver, an exception is raised.
Writes a copy of the data encapsulated by the
receiver to a file at path. If the
useAuxiliaryFile flag is
YES
, this writes to a temporary file
and then renames that to the file at path,
thus ensuring that path exists and does
not contain partially written data at any point.
On success returns YES
, on failure
returns NO
.
Writes a copy of the contents of the receiver to the specified URL.
- Declared in:
- Foundation/NSData.h
Standards:
- MacOS-X
- OpenStep
- GNUstep
Description forthcoming.
Method summaryDescription forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Returns a pointer to the data storage of the
receiver.
Modifications to the memory
pointed to by this pointer will change the
contents of the object. It is important that
your code should not try to modify the memory beyond
the number of bytes given by the
-length
method.
NB. if the object is released, or any method that changes its size or content is called, then the pointer previously returned by this method may cease to be valid.
This is a 'primitive' method... you need to implement it if you write a subclass of NSMutableData.
Replaces the bytes of data in the
specified range with a copy of the new
bytes supplied.
If the location of
the range specified lies beyond the end of the data (
[self length] < range.location
) then
a range exception is raised.
Otherwise, if the
range specified extends beyond the end of the data,
then the size of the data is increased to accomodate
the new bytes.
Replace the content of the receiver which lies in
aRange with the specified
length of data from the buffer pointed to
by bytes.
The size of the receiver is
adjusted to allow for the change.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Sets the length of the NSMutableData object. If the length is increased, the newly allocated data area is filled with zero bytes.
This is a 'primitive' method... you need to implement it if you write a subclass of NSMutableData.
- Declared in:
- Foundation/NSData.h
Standards:
- NotOpenStep
- NotMacOS-X
- GNUstep
Description forthcoming.
Method summaryDescription forthcoming.
Description forthcoming.
Description forthcoming.
- Declared in:
- Foundation/NSData.h
Standards:
- NotOpenStep
- NotMacOS-X
- GNUstep
Description forthcoming.
Method summaryDescription forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
- Declared in:
- Foundation/NSData.h
Standards:
- NotOpenStep
- NotMacOS-X
- GNUstep
Description forthcoming.
Method summaryDescription forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.