Java Doc for UtfOps.java in  » JMX » je » com » sleepycat » util » 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 » JMX » je » com.sleepycat.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sleepycat.util.UtfOps

UtfOps
public class UtfOps (Code)
UTF operations with more flexibility than is provided by DataInput and DataOutput.
author:
   Mark Hayes




Method Summary
public static  intbytesToChars(byte[] bytes, int byteOffset, char[] chars, int charOffset, int len, boolean isByteLen)
     Converts byte arrays into character arrays.
public static  StringbytesToString(byte[] bytes, int offset, int length)
     Converts byte arrays into strings.
Parameters:
  bytes - the source byte data to convert
Parameters:
  offset - the offset into the byte array at whichto start the conversion
Parameters:
  length - the number of bytes to be converted.
public static  voidcharsToBytes(char[] chars, int charOffset, byte[] bytes, int byteOffset, int charLength)
     Converts character arrays into byte arrays.
public static  intgetByteLength(char[] chars)
     Returns the byte length of the UTF string that would be created by converting the given characters to UTF.
Parameters:
  chars - the characters that would be converted.
public static  intgetByteLength(char[] chars, int offset, int length)
     Returns the byte length of the UTF string that would be created by converting the given characters to UTF.
Parameters:
  chars - the characters that would be converted.
Parameters:
  offset - the first character to be converted.
Parameters:
  length - the number of characters to be converted.
public static  intgetCharLength(byte[] bytes)
     Returns the number of characters represented by the given UTF string.
Parameters:
  bytes - the UTF string.
public static  intgetCharLength(byte[] bytes, int offset, int length)
     Returns the number of characters represented by the given UTF string.
public static  intgetZeroTerminatedByteLength(byte[] bytes, int offset)
     Returns the byte length of a null terminated UTF string, not including the terminator.
Parameters:
  bytes - the data containing the UTF string.
Parameters:
  offset - the beginning of the string the measure.
throws:
  IndexOutOfBoundsException - if no zero terminator is found.
public static  byte[]stringToBytes(String string)
     Converts strings to byte arrays.
Parameters:
  string - the string to convert.



Method Detail
bytesToChars
public static int bytesToChars(byte[] bytes, int byteOffset, char[] chars, int charOffset, int len, boolean isByteLen) throws IllegalArgumentException, IndexOutOfBoundsException(Code)
Converts byte arrays into character arrays.
Parameters:
  bytes - the source byte data to convert
Parameters:
  byteOffset - the offset into the byte array at whichto start the conversion
Parameters:
  chars - the destination array
Parameters:
  charOffset - the offset into chars at which to begin the copy
Parameters:
  len - the amount of information to copy into chars
Parameters:
  isByteLen - if true then len is a measure of bytes, otherwiselen is a measure of characters
throws:
  IndexOutOfBoundsException - if a UTF character sequence at the endof the data is not complete.
throws:
  IllegalArgumentException - if an illegal UTF sequence isencountered.



bytesToString
public static String bytesToString(byte[] bytes, int offset, int length) throws IllegalArgumentException, IndexOutOfBoundsException(Code)
Converts byte arrays into strings.
Parameters:
  bytes - the source byte data to convert
Parameters:
  offset - the offset into the byte array at whichto start the conversion
Parameters:
  length - the number of bytes to be converted. the string.
throws:
  IndexOutOfBoundsException - if a UTF character sequence at the endof the data is not complete.
throws:
  IllegalArgumentException - if an illegal UTF sequence isencountered.



charsToBytes
public static void charsToBytes(char[] chars, int charOffset, byte[] bytes, int byteOffset, int charLength)(Code)
Converts character arrays into byte arrays.
Parameters:
  chars - the source character data to convert
Parameters:
  charOffset - the offset into the character array at whichto start the conversion
Parameters:
  bytes - the destination array
Parameters:
  byteOffset - the offset into bytes at which to begin the copy
Parameters:
  charLength - the length of characters to copy into bytes



getByteLength
public static int getByteLength(char[] chars)(Code)
Returns the byte length of the UTF string that would be created by converting the given characters to UTF.
Parameters:
  chars - the characters that would be converted. the byte length of the equivalent UTF data.



getByteLength
public static int getByteLength(char[] chars, int offset, int length)(Code)
Returns the byte length of the UTF string that would be created by converting the given characters to UTF.
Parameters:
  chars - the characters that would be converted.
Parameters:
  offset - the first character to be converted.
Parameters:
  length - the number of characters to be converted. the byte length of the equivalent UTF data.



getCharLength
public static int getCharLength(byte[] bytes) throws IllegalArgumentException, IndexOutOfBoundsException(Code)
Returns the number of characters represented by the given UTF string.
Parameters:
  bytes - the UTF string. the number of characters.
throws:
  IndexOutOfBoundsException - if a UTF character sequence at the endof the data is not complete.
throws:
  IllegalArgumentException - if an illegal UTF sequence isencountered.



getCharLength
public static int getCharLength(byte[] bytes, int offset, int length) throws IllegalArgumentException, IndexOutOfBoundsException(Code)
Returns the number of characters represented by the given UTF string.
Parameters:
  bytes - the data containing the UTF string.
Parameters:
  offset - the first byte to be converted.
Parameters:
  length - the number of byte to be converted.
throws:
  IndexOutOfBoundsException - if a UTF character sequence at the endof the data is not complete.
throws:
  IllegalArgumentException - if an illegal UTF sequence isencountered.



getZeroTerminatedByteLength
public static int getZeroTerminatedByteLength(byte[] bytes, int offset) throws IndexOutOfBoundsException(Code)
Returns the byte length of a null terminated UTF string, not including the terminator.
Parameters:
  bytes - the data containing the UTF string.
Parameters:
  offset - the beginning of the string the measure.
throws:
  IndexOutOfBoundsException - if no zero terminator is found. the number of bytes.



stringToBytes
public static byte[] stringToBytes(String string)(Code)
Converts strings to byte arrays.
Parameters:
  string - the string to convert. the UTF byte array.



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.