Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The TextBuffer class manages arbitrary text file content, and generates and manipulates text.
Syntax
class TextBuffer extends Object
Run On
Called
Methods
Method | Description | |
---|---|---|
![]() |
accept | |
![]() |
appendText | Appends a string to the content of the TextBuffer object. |
![]() |
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) |
![]() |
decryptOld | |
![]() |
delete | |
![]() |
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) |
![]() |
find | Searches the TextBuffer object for any occurrence of a string expression. |
![]() |
fromClipboard | Replaces the content of the TextBuffer object with the content of the clipboard. |
![]() |
fromFile | Replaces the content of a TextBuffer object with the content of the specified file. |
![]() |
getText | Retrieves the current content of the TextBuffer object. |
![]() |
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) |
![]() |
getValue | |
![]() |
handle | Retrieves the handle of the class of the object. (Inherited from Object.) |
![]() |
ignoreCase | |
![]() |
insert | |
![]() |
isNext | |
![]() |
matchLen | Returns the string length of the first match in the TextBuffer object. |
![]() |
matchPos | Returns the character position of the first occurrence of the search string in the TextBuffer object. |
![]() |
new | Initializes a new instance of the TextBuffer class. (Overrides the new Method.) |
![]() |
nextToken | |
![]() |
notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) |
![]() |
notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) |
![]() |
numLines | Retrieves the number of lines in the TextBuffer object. |
![]() |
objectOnServer | Determines whether the object is on a server. (Inherited from Object.) |
![]() |
owner | Returns the instance that owns the object. (Inherited from Object.) |
![]() |
regularExpressions | |
![]() |
removeChar | |
![]() |
replace | |
![]() |
setText | Sets the content of the TextBuffer object to the specified string, overwriting any existing content. |
![]() |
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) |
![]() |
size | |
![]() |
subStr | Retrieves part of the content of the TextBuffer object (a substring). |
![]() |
toClipboard | Copies the content of a TextBuffer object to the clipboard. |
![]() |
toFile | Saves the content of the TextBuffer object to a file. |
![]() |
token | |
![]() |
toString | Returns a string that represents the current object. (Overrides the toString Method.) |
![]() |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) |
![]() |
wait | Pauses a process. (Inherited from Object.) |
![]() |
xml | Returns an XML string that represents the current object. (Inherited from Object.) |
![]() ![]() |
::strHashKey |
Top
Remarks
This class features various string operations, a simple clipboard, and a file interface.
Examples
static void example()
{
FileIoPermission _perm = new FileIoPermission("myfile.txt",'r');
TextBuffer txtb = new TextBuffer();
_perm.assert();
txtb.fromFile("myfile.txt"); // Read text from file
txtb.toClipboard(); // Copy it to the clipboard
}
Inheritance Hierarchy
Object Class
TextBuffer Class
MCRTextBuffer Class