Java Doc for CharWrap.java in  » Web-Framework » RSF » uk » org » ponder » stringutil » 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 » Web Framework » RSF » uk.org.ponder.stringutil 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   uk.org.ponder.stringutil.CharWrap

CharWrap
public class CharWrap (Code)
CharWrap provides the basic functionality of the Java StringBuffer class, only without the overhead of synchonised methods and with the ability (and corresponding danger) of direct access to the underlying array of characters.
CharWrap also integrates with the StringVat to map a string to an integer StringVat ID without causing an extra object creation.
At some point either the functionality needs to be added to "pre-intern" String objects from their CharWrap counterparts, or else String s should be removed completely from critical pathways through the code (e.g. SAXalizer and interfaces)


Field Summary
final public static  intINITIAL_SIZE
    
final public static  intPAD_LEFT
    
final public static  intPAD_RIGHT
    
public  intoffset
    
public  intsize
    
public  char[]storage
    

Constructor Summary
public  CharWrap()
    
public  CharWrap(int initialsize)
     Constructs a CharWrap with the specified initial size.
public  CharWrap(String initialcontents)
     Constructs a CharWrap with the specified initial contents, in an array allowing for expansion of factor 2.
public  CharWrap(char[] storage, int offset, int size)
     Constructs a CharWrap around the supplied parameters, i.e. aliasing the supplied storage array.

Method Summary
final public  CharWrapappend(String s)
     Appends the characters in the supplied string onto this CharWrap.
Parameters:
  s - A String holding the character data to be appended.
public  CharWrapappend(Object o)
     Appends the "toString" value of the supplied Object to this CharWrap.
public  CharWrapappend(CharWrap toappend)
     Appends the characters in the supplied CharWrap onto this CharWrap.
Parameters:
  toappend - A CharWrap holding the character data to be appended.
public  CharWrapappend(char[] array, int start, int length)
     Appends the specified character data onto this CharWrap.
Parameters:
  storage - The array holding the character data to be appended.
Parameters:
  offset - The offset within the array of the beginning of the characterdata.
Parameters:
  size - The length of the character data.
public  CharWrapappend(char c)
     Appends the specified character onto this CharWrap.
Parameters:
  c - The character to be appended.
public  CharWrapappend(int i)
    
Parameters:
  i - Appends the specified integer rendered as a string onto thisCharWrap.
final public  voidappendFast(char c)
     Appends the specified character onto this CharWrap, without bounds checks.
public  CharWrapappendHexChar(char toappend)
    
public  CharWrapappendPad(String s, int width, int dir)
    
public  intcapacity()
     Returns the number of characters that can be appended to this CharWrap before it needs to reallocate its underlying character array.
public  charcharAt(int index)
    
final public static  StringcharToHex(char tohex)
     Converts a character to a String holding a hexadecimal representation.
public  CharWrapclear()
     Clears this CharWrap by setting its size to zero.
final public  voidensureCapacity(int requiredsize)
    
public  booleanequals(Object othero)
     Compares this CharWrap with another object.
public  inthashCode()
     Computes a hashcode for this CharWrap.
public  voidimbue(char[] storage, int offset, int size)
     Imbues this CharWrap with the supplied parameters, i.e.  aliasing the supplied storage array.
public  intindexOf(char tofind)
     Returns the first index at which a character appears in this CharWrap.
Parameters:
  tofind - The character to find.
public  intsize()
     Returns the number of characters stored within this CharWrap.
public  StringtoDebugString()
     Converts this CharWrap to a new String object for debugging purposes.
public  StringtoString()
     Converts this CharWrap to a new String object.
public  StringtoString(int start)
    

Field Detail
INITIAL_SIZE
final public static int INITIAL_SIZE(Code)
The default initial size for a CharWrap



PAD_LEFT
final public static int PAD_LEFT(Code)



PAD_RIGHT
final public static int PAD_RIGHT(Code)



offset
public int offset(Code)
The offset within the storage array at which the data represented by this CharWrap begins



size
public int size(Code)
The length of the data represented by this CharWrap



storage
public char[] storage(Code)
An array holding the character data for this CharWrap




Constructor Detail
CharWrap
public CharWrap()(Code)
Constructs a CharWrap with the default INITIAL_SIZE



CharWrap
public CharWrap(int initialsize)(Code)
Constructs a CharWrap with the specified initial size.
Parameters:
  initialsize - The initial size of the character array.



CharWrap
public CharWrap(String initialcontents)(Code)
Constructs a CharWrap with the specified initial contents, in an array allowing for expansion of factor 2.
Parameters:
  initialcontents - The initial contents of the CharWrap



CharWrap
public CharWrap(char[] storage, int offset, int size)(Code)
Constructs a CharWrap around the supplied parameters, i.e. aliasing the supplied storage array.
Parameters:
  storage - The array holding the character data.
Parameters:
  offset - The offset within the array of the beginning of the characterdata.
Parameters:
  size - The length of the character data.




Method Detail
append
final public CharWrap append(String s)(Code)
Appends the characters in the supplied string onto this CharWrap.
Parameters:
  s - A String holding the character data to be appended. A reference to this CharWrap.



append
public CharWrap append(Object o)(Code)
Appends the "toString" value of the supplied Object to this CharWrap. The value will not be checked for null.



append
public CharWrap append(CharWrap toappend)(Code)
Appends the characters in the supplied CharWrap onto this CharWrap.
Parameters:
  toappend - A CharWrap holding the character data to be appended. A reference to this CharWrap.



append
public CharWrap append(char[] array, int start, int length)(Code)
Appends the specified character data onto this CharWrap.
Parameters:
  storage - The array holding the character data to be appended.
Parameters:
  offset - The offset within the array of the beginning of the characterdata.
Parameters:
  size - The length of the character data. A reference to this CharWrap.



append
public CharWrap append(char c)(Code)
Appends the specified character onto this CharWrap.
Parameters:
  c - The character to be appended. A reference to this CharWrap.



append
public CharWrap append(int i)(Code)

Parameters:
  i - Appends the specified integer rendered as a string onto thisCharWrap. A reference to this CharWrap



appendFast
final public void appendFast(char c)(Code)
Appends the specified character onto this CharWrap, without bounds checks.



appendHexChar
public CharWrap appendHexChar(char toappend)(Code)



appendPad
public CharWrap appendPad(String s, int width, int dir)(Code)



capacity
public int capacity()(Code)
Returns the number of characters that can be appended to this CharWrap before it needs to reallocate its underlying character array. The spare capacity at the end of this CharWrap's character array.



charAt
public char charAt(int index)(Code)



charToHex
final public static String charToHex(char tohex)(Code)
Converts a character to a String holding a hexadecimal representation. The form of the representation is the HTML entity encoding the character as Unicode.
Parameters:
  tohex - The character to be represented as hexadecimal. A string holding the character in HTML Unicode-entity form.



clear
public CharWrap clear()(Code)
Clears this CharWrap by setting its size to zero.



ensureCapacity
final public void ensureCapacity(int requiredsize)(Code)



equals
public boolean equals(Object othero)(Code)
Compares this CharWrap with another object. It is possible for a CharWrap to compare equal to a String with the same contents as well as to another CharWrap.
Parameters:
  othero - An object to compare this CharWrap to. Returns true if the other object is either a Stringor a CharWrap with the same contents as this CharWrap.



hashCode
public int hashCode()(Code)
Computes a hashcode for this CharWrap. An integer hashcode for this CharWap, currently by the CRC32algorithm.



imbue
public void imbue(char[] storage, int offset, int size)(Code)
Imbues this CharWrap with the supplied parameters, i.e.  aliasing the supplied storage array.
Parameters:
  storage - The array holding the character data.
Parameters:
  offset - The offset of the beginning of the character data within thearray.
Parameters:
  size - The length of the character data.



indexOf
public int indexOf(char tofind)(Code)
Returns the first index at which a character appears in this CharWrap.
Parameters:
  tofind - The character to find. The first index at which the specified character occurs, or-1 if it does not appear.



size
public int size()(Code)
Returns the number of characters stored within this CharWrap. The size of the character data for this CharWrap.



toDebugString
public String toDebugString()(Code)
Converts this CharWrap to a new String object for debugging purposes. This string resolves all non-printable-ASCII characters into their hex equivalents. A String representing this CharWrap with only ASCII printablecharacters.



toString
public String toString()(Code)
Converts this CharWrap to a new String object. A new String object holding the same character data as thisCharWrap.



toString
public String toString(int start)(Code)



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.