Java Doc for Utility.java in  » 6.0-JDK-Modules » j2me » sun » text » 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 » 6.0 JDK Modules » j2me » sun.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   sun.text.Utility

Utility
final public class Utility (Code)


Field Summary
final static  charESCAPE
     The ESCAPE character is used during run-length encoding.
final static  byteESCAPE_BYTE
     The ESCAPE_BYTE character is used during run-length encoding.
final static  char[]HEX_DIGIT
    


Method Summary
final public static  byte[]RLEStringToByteArray(String s)
     Construct an array of bytes from a run-length encoded string.
final public static  char[]RLEStringToCharArray(String s)
     Construct an array of shorts from a run-length encoded string.
final public static  int[]RLEStringToIntArray(String s)
     Construct an array of ints from a run-length encoded string.
final public static  short[]RLEStringToShortArray(String s)
     Construct an array of shorts from a run-length encoded string.
final public static  booleanarrayEquals(Object[] source, Object target)
     Convenience utility to compare two Object[]s.
final public static  booleanarrayEquals(int[] source, Object target)
    
final public static  booleanarrayEquals(double[] source, Object target)
    
final public static  booleanarrayEquals(Object source, Object target)
    
final public static  booleanarrayRegionMatches(Object[] source, int sourceStart, Object[] target, int targetStart, int len)
     Convenience utility to compare two Object[]s Ought to be in System.
final public static  booleanarrayRegionMatches(int[] source, int sourceStart, int[] target, int targetStart, int len)
     Convenience utility to compare two int[]s.
final public static  booleanarrayRegionMatches(double[] source, int sourceStart, double[] target, int targetStart, int len)
     Convenience utility to compare two arrays of doubles.
final public static  StringarrayToRLEString(short[] a)
     Construct a string representing a short array.
final public static  StringarrayToRLEString(byte[] a)
     Construct a string representing a byte array.
final public static  StringarrayToRLEString(char[] a)
     Construct a string representing a char array.
final public static  StringarrayToRLEString(int[] a)
     Construct a string representing an int array.
final public static  StringformatForSource(String s)
     Format a String for representation in a source file.
final static  intgetInt(String s, int i)
    
final public static  Stringhex(char ch)
    
final public static  StringBufferhex(String src, StringBuffer buff)
    
final public static  Stringhex(String str)
    
final public static  Stringhex(StringBuffer buff)
    
final public static  StringBufferhex(char ch, StringBuffer buff)
    
final public static  booleanobjectEquals(Object source, Object target)
     Convenience utility.

Field Detail
ESCAPE
final static char ESCAPE(Code)
The ESCAPE character is used during run-length encoding. It signals a run of identical chars.



ESCAPE_BYTE
final static byte ESCAPE_BYTE(Code)
The ESCAPE_BYTE character is used during run-length encoding. It signals a run of identical bytes.



HEX_DIGIT
final static char[] HEX_DIGIT(Code)





Method Detail
RLEStringToByteArray
final public static byte[] RLEStringToByteArray(String s)(Code)
Construct an array of bytes from a run-length encoded string.



RLEStringToCharArray
final public static char[] RLEStringToCharArray(String s)(Code)
Construct an array of shorts from a run-length encoded string.



RLEStringToIntArray
final public static int[] RLEStringToIntArray(String s)(Code)
Construct an array of ints from a run-length encoded string.



RLEStringToShortArray
final public static short[] RLEStringToShortArray(String s)(Code)
Construct an array of shorts from a run-length encoded string.



arrayEquals
final public static boolean arrayEquals(Object[] source, Object target)(Code)
Convenience utility to compare two Object[]s. Ought to be in System



arrayEquals
final public static boolean arrayEquals(int[] source, Object target)(Code)
Convenience utility to compare two int[]s Ought to be in System



arrayEquals
final public static boolean arrayEquals(double[] source, Object target)(Code)
Convenience utility to compare two double[]s Ought to be in System



arrayEquals
final public static boolean arrayEquals(Object source, Object target)(Code)
Convenience utility to compare two Object[]s Ought to be in System



arrayRegionMatches
final public static boolean arrayRegionMatches(Object[] source, int sourceStart, Object[] target, int targetStart, int len)(Code)
Convenience utility to compare two Object[]s Ought to be in System.
Parameters:
  len - the length to compare.The start indices and start+len must be valid.



arrayRegionMatches
final public static boolean arrayRegionMatches(int[] source, int sourceStart, int[] target, int targetStart, int len)(Code)
Convenience utility to compare two int[]s.
Parameters:
  len - the length to compare.The start indices and start+len must be valid.Ought to be in System



arrayRegionMatches
final public static boolean arrayRegionMatches(double[] source, int sourceStart, double[] target, int targetStart, int len)(Code)
Convenience utility to compare two arrays of doubles.
Parameters:
  len - the length to compare.The start indices and start+len must be valid.Ought to be in System



arrayToRLEString
final public static String arrayToRLEString(short[] a)(Code)
Construct a string representing a short array. Use run-length encoding. A character represents itself, unless it is the ESCAPE character. Then the following notations are possible: ESCAPE ESCAPE ESCAPE literal ESCAPE n c n instances of character c Since an encoded run occupies 3 characters, we only encode runs of 4 or more characters. Thus we have n > 0 and n != ESCAPE and n <= 0xFFFF. If we encounter a run where n == ESCAPE, we represent this as: c ESCAPE n-1 c The ESCAPE value is chosen so as not to collide with commonly seen values.



arrayToRLEString
final public static String arrayToRLEString(byte[] a)(Code)
Construct a string representing a byte array. Use run-length encoding. Two bytes are packed into a single char, with a single extra zero byte at the end if needed. A byte represents itself, unless it is the ESCAPE_BYTE. Then the following notations are possible: ESCAPE_BYTE ESCAPE_BYTE ESCAPE_BYTE literal ESCAPE_BYTE n b n instances of byte b Since an encoded run occupies 3 bytes, we only encode runs of 4 or more bytes. Thus we have n > 0 and n != ESCAPE_BYTE and n <= 0xFF. If we encounter a run where n == ESCAPE_BYTE, we represent this as: b ESCAPE_BYTE n-1 b The ESCAPE_BYTE value is chosen so as not to collide with commonly seen values.



arrayToRLEString
final public static String arrayToRLEString(char[] a)(Code)
Construct a string representing a char array. Use run-length encoding. A character represents itself, unless it is the ESCAPE character. Then the following notations are possible: ESCAPE ESCAPE ESCAPE literal ESCAPE n c n instances of character c Since an encoded run occupies 3 characters, we only encode runs of 4 or more characters. Thus we have n > 0 and n != ESCAPE and n <= 0xFFFF. If we encounter a run where n == ESCAPE, we represent this as: c ESCAPE n-1 c The ESCAPE value is chosen so as not to collide with commonly seen values.



arrayToRLEString
final public static String arrayToRLEString(int[] a)(Code)
Construct a string representing an int array. Use run-length encoding. A character represents itself, unless it is the ESCAPE character. Then the following notations are possible: ESCAPE ESCAPE ESCAPE literal ESCAPE n c n instances of character c Since an encoded run occupies 3 characters, we only encode runs of 4 or more characters. Thus we have n > 0 and n != ESCAPE and n <= 0xFFFF. If we encounter a run where n == ESCAPE, we represent this as: c ESCAPE n-1 c The ESCAPE value is chosen so as not to collide with commonly seen values.



formatForSource
final public static String formatForSource(String s)(Code)
Format a String for representation in a source file. This includes breaking it into lines escaping characters using octal notation when necessary (control characters and double quotes).



getInt
final static int getInt(String s, int i)(Code)



hex
final public static String hex(char ch)(Code)



hex
final public static StringBuffer hex(String src, StringBuffer buff)(Code)



hex
final public static String hex(String str)(Code)



hex
final public static String hex(StringBuffer buff)(Code)



hex
final public static StringBuffer hex(char ch, StringBuffer buff)(Code)



objectEquals
final public static boolean objectEquals(Object source, Object target)(Code)
Convenience utility. Does null checks on objects, then calls equals.



Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.