Java Doc for FastStringBuffer.java in  » XML » saxonb » net » sf » saxon » om » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » saxonb » net.sf.saxon.om 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.saxon.om.FastStringBuffer

FastStringBuffer
final public class FastStringBuffer implements CharSequence,Serializable(Code)
A simple implementation of a class similar to StringBuffer. Unlike StringBuffer it is not synchronized. It also offers the capability to remove unused space. (This class could possibly be replaced by StringBuilder in JDK 1.5, but using our own class gives more control.)



Constructor Summary
public  FastStringBuffer(int initialSize)
    

Method Summary
public  voidappend(String s)
    
public  voidappend(CharSlice s)
    
public  voidappend(FastStringBuffer s)
    
public  voidappend(StringBuffer s)
    
public  voidappend(CharSequence s)
    
public  voidappend(char[] srcArray, int start, int length)
    
public  voidappend(char ch)
    
public  charcharAt(int index)
     Returns the char value at the specified index.
public  CharSequencecondense()
     Remove surplus space from the array.
public  voidensureCapacity(int extra)
    
public  voidgetChars(int srcBegin, int srcEnd, char dst, int dstBegin)
     Copies characters from this FastStringBuffer into the destination character array.

The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1 (thus the total number of characters to be copied is srcEnd-srcBegin).

public  intlength()
     Returns the length of this character sequence.
public  voidsetCharAt(int index, char ch)
    
public  voidsetLength(int length)
     Set the length.
public  CharSequencesubSequence(int start, int end)
     Returns a new CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1.
public  StringtoString()
    
public  voidwrite(Writer writer)
    


Constructor Detail
FastStringBuffer
public FastStringBuffer(int initialSize)(Code)




Method Detail
append
public void append(String s)(Code)
Append the contents of a String to the buffer
Parameters:
  s - the String to be appended



append
public void append(CharSlice s)(Code)
Append the contents of a CharSlice to the buffer
Parameters:
  s - the String to be appended



append
public void append(FastStringBuffer s)(Code)
Append the contents of a FastStringBuffer to the buffer
Parameters:
  s - the FastStringBuffer to be appended



append
public void append(StringBuffer s)(Code)
Append the contents of a StringBuffer to the buffer
Parameters:
  s - the StringBuffer to be appended



append
public void append(CharSequence s)(Code)
Append the contents of a general CharSequence to the buffer
Parameters:
  s - the CharSequence to be appended



append
public void append(char[] srcArray, int start, int length)(Code)
Append the contents of a character array to the buffer
Parameters:
  srcArray - the array whose contents are to be added
Parameters:
  start - the offset of the first character in the array to be copied
Parameters:
  length - the number of characters to be copied



append
public void append(char ch)(Code)
Append a character to the buffer
Parameters:
  ch - the character to be added



charAt
public char charAt(int index)(Code)
Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.
Parameters:
  index - the index of the char value to be returned the specified char value
throws:
  IndexOutOfBoundsException - if the index argument is negative or not less thanlength()




condense
public CharSequence condense()(Code)
Remove surplus space from the array. This doesn't reduce the array to the minimum possible size; it only reclaims space if it seems worth doing. Specifically, it contracts the array if the amount of wasted space is more than 256 characters, or more than half the allocated size.



ensureCapacity
public void ensureCapacity(int extra)(Code)
Expand the character array if necessary to ensure capacity for appended data



getChars
public void getChars(int srcBegin, int srcEnd, char dst, int dstBegin)(Code)
Copies characters from this FastStringBuffer into the destination character array.

The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1 (thus the total number of characters to be copied is srcEnd-srcBegin). The characters are copied into the subarray of dst starting at index dstBegin and ending at index:

 dstbegin + (srcEnd-srcBegin) - 1
 

Parameters:
  srcBegin - index of the first character in the stringto copy.
Parameters:
  srcEnd - index after the last character in the stringto copy.
Parameters:
  dst - the destination array.
Parameters:
  dstBegin - the start offset in the destination array.
exception:
  IndexOutOfBoundsException - If any of the followingis true:
  • srcBegin is negative.
  • srcBegin is greater than srcEnd
  • srcEnd is greater than the length of thisstring
  • dstBegin is negative
  • dstBegin+(srcEnd-srcBegin) is larger thandst.length



length
public int length()(Code)
Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

the number of chars in this sequence



setCharAt
public void setCharAt(int index, char ch)(Code)
Set the character at a particular offset
Parameters:
  index - the index of the character to be set
Parameters:
  ch - the new character to overwrite the existing character at that location
throws:
  IndexOutOfBoundsException - if int<0 or int>=length()



setLength
public void setLength(int length)(Code)
Set the length. If this exceeds the current length, this method is a no-op. If this is less than the current length, characters beyond the specified point are deleted.
Parameters:
  length - the new length



subSequence
public CharSequence subSequence(int start, int end)(Code)
Returns a new CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.


Parameters:
  start - the start index, inclusive
Parameters:
  end - the end index, exclusive the specified subsequence
throws:
  IndexOutOfBoundsException - if start or end are negative,if end is greater than length(),or if start is greater than end



toString
public String toString()(Code)
Convert contents of the FastStringBuffer to a string



write
public void write(Writer writer) throws java.io.IOException(Code)
Write the value to a writer



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.