This object represents raw, unformatted data.
Constructor function.
var myObject = new RawData();
var myObject = new RawData(otherRawData);
Create an empty RawData.
var myObject = new RawData();
Create a RawData representing a copy of otherRawData.
var myObject = new RawData(otherRawData);
Returns a copy of this RawData.
myObject.clone();
var copyOfMyObject = myObject.clone();
Returns true if this RawData and another are referencing the same data.
myObject.equals(other);
if(myFirstObject.equals(mySecondObject)) //Do something
Returns a string representing this RawData.
myObject.toString();
Console.print(myObject.toString());
This method is automatically called when trying to convert a RawData to a string.
Appends data to this RawData.
myObject.append(data);
myObject.append("some text");
myObject.append(1337);
Removes n bytes from the end of this RawData.
myObject.chop(n);
Clears the content of this RawData.
myObject.clear();
Returns true if this RawData contains an occurrence of some other data.
myObject.contains(data);
Returns the number of occurrences of some other data in this RawData.
myObject.count(data);
Returns true if this RawData ends with some other data.
myObject.endsWith(data);
Returns the position of the first occurrence of some data, starting at from.
myObject.indexOf(data);
myObject.indexOf(data, from);
Returns true if this RawData is empty.
myObject.isEmpty();
Returns the position of the last occurrence of some data.
myObject.lastIndexOf(data);
Returns a new RawData that contains the leftmost len bytes of this RawData.
myObject.left(len);
Returns the length of this RawData.
myObject.length();
Returns a new RawData containing len bytes, starting at position pos.
myObject.mid(pos);
myObject.mid(pos, len);
Prepends data to this RawData.
myObject.prepend(data);
myObject.prepend("some text");
myObject.prepend(1337);
Remove len bytes, starting at position pos.
myObject.remove(pos);
myObject.remove(pos, len);
Replace every occurrence of before with after.
myObject.replace(before, after);
Resizes this RawData.
myObject.resize(size);
Returns a new RawData that contains the rightmost len bytes of this RawData.
myObject.right(len);
Sets the data of this RawData.
myObject.setData(data);
Returns the size of this RawData.
myObject.size();
Returns true if this RawData starts with some other data.
myObject.startsWith(data);
Try to convert this RawData to a number.
myObject.convertToNumber();
Try to convert this RawData to a string.
myObject.convertToString(encoding);
Truncates the RawData at index position pos.
myObject.truncate(pos);