webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Immutable array of bytes. More...
Classes | |
class | Unsafe |
Unsafe operations that can cause IO Failure and/or other catestrophic side-effects. | |
Public Member Functions | |
byte [] | ToByteArray () |
Converts this ByteString into a byte array. More... | |
string | ToBase64 () |
Converts this ByteString into a standard base64 representation. More... | |
string | ToString (Encoding encoding) |
Converts this ByteString into a string by applying the given encoding. More... | |
string | ToStringUtf8 () |
Converts this ByteString into a string by applying the UTF-8 encoding. More... | |
IEnumerator< byte > | GetEnumerator () |
Returns an iterator over the bytes in this ByteString. More... | |
CodedInputStream | CreateCodedInput () |
Creates a CodedInputStream from this ByteString's data. More... | |
override bool | Equals (object obj) |
Compares this byte string with another object. More... | |
override int | GetHashCode () |
Returns a hash code for this object. Two equal byte strings will return the same hash code. More... | |
bool | Equals (ByteString other) |
Compares this byte string with another. More... | |
void | CopyTo (byte[] array, int position) |
Copies the entire byte array to the destination array provided at the offset specified. More... | |
void | WriteTo (Stream outputStream) |
Writes the entire byte array to the provided stream More... | |
Static Public Member Functions | |
static ByteString | FromBase64 (string bytes) |
Constructs a ByteString from the Base64 Encoded String. More... | |
static ByteString | CopyFrom (params byte[] bytes) |
Constructs a ByteString from the given array. The contents are copied, so further modifications to the array will not be reflected in the returned ByteString. This method can also be invoked in ByteString.CopyFrom(0xaa, 0xbb, ...) form which is primarily useful for testing. More... | |
static ByteString | CopyFrom (byte[] bytes, int offset, int count) |
Constructs a ByteString from a portion of a byte array. More... | |
static ByteString | CopyFrom (string text, Encoding encoding) |
Creates a new ByteString by encoding the specified text with the given encoding. More... | |
static ByteString | CopyFromUtf8 (string text) |
Creates a new ByteString by encoding the specified text in UTF-8. More... | |
static bool | operator== (ByteString lhs, ByteString rhs) |
Compares two byte strings for equality. More... | |
static bool | operator!= (ByteString lhs, ByteString rhs) |
Compares two byte strings for inequality. More... | |
Properties | |
static ByteString | Empty [get] |
Returns an empty ByteString. More... | |
int | Length [get] |
Returns the length of this ByteString in bytes. More... | |
bool | IsEmpty [get] |
Returns true if this byte string is empty, false otherwise. More... | |
byte | this[int index] [get] |
Retuns the byte at the given index. More... | |
Immutable array of bytes.
|
inlinestatic |
Constructs a ByteString from the given array. The contents are copied, so further modifications to the array will not be reflected in the returned ByteString. This method can also be invoked in ByteString.CopyFrom(0xaa, 0xbb, ...)
form which is primarily useful for testing.
|
inlinestatic |
Constructs a ByteString from a portion of a byte array.
|
inlinestatic |
Creates a new ByteString by encoding the specified text with the given encoding.
|
inlinestatic |
Creates a new ByteString by encoding the specified text in UTF-8.
|
inline |
Copies the entire byte array to the destination array provided at the offset specified.
|
inline |
Creates a CodedInputStream from this ByteString's data.
|
inline |
Compares this byte string with another object.
obj | The object to compare this with. |
true
if obj refers to an equal ByteString; false
otherwise.
|
inline |
Compares this byte string with another.
other | The ByteString to compare this with. |
true
if other refers to an equal byte string; false
otherwise.
|
inlinestatic |
Constructs a ByteString from the Base64 Encoded String.
|
inline |
Returns an iterator over the bytes in this ByteString.
|
inline |
Returns a hash code for this object. Two equal byte strings will return the same hash code.
|
inlinestatic |
|
inlinestatic |
|
inline |
Converts this ByteString into a standard base64 representation.
ByteString
.
|
inline |
Converts this ByteString into a byte array.
The data is copied - changes to the returned array will not be reflected in this ByteString
.
ByteString
.
|
inline |
Converts this ByteString into a string by applying the given encoding.
This method should only be used to convert binary data which was the result of encoding text with the given encoding.
encoding | The encoding to use to decode the binary data into text. |
|
inline |
Converts this ByteString into a string by applying the UTF-8 encoding.
This method should only be used to convert binary data which was the result of encoding text with UTF-8.
|
inline |
Writes the entire byte array to the provided stream
|
staticget |
Returns an empty ByteString.
|
get |
Returns true
if this byte string is empty, false
otherwise.
|
get |
Returns the length of this ByteString in bytes.
|
get |
Retuns the byte at the given index.