Source Code Cross Referenced for Conv.java in  » 6.0-JDK-Modules » j2me » com » sun » cdc » i18n » j2me » 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 » com.sun.cdc.i18n.j2me 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *   
003:         *
004:         * Copyright  1990-2007 Sun Microsystems, Inc. All Rights Reserved.
005:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
006:         * 
007:         * This program is free software; you can redistribute it and/or
008:         * modify it under the terms of the GNU General Public License version
009:         * 2 only, as published by the Free Software Foundation.
010:         * 
011:         * This program is distributed in the hope that it will be useful, but
012:         * WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014:         * General Public License version 2 for more details (a copy is
015:         * included at /legal/license.txt).
016:         * 
017:         * You should have received a copy of the GNU General Public License
018:         * version 2 along with this work; if not, write to the Free Software
019:         * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020:         * 02110-1301 USA
021:         * 
022:         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
023:         * Clara, CA 95054 or visit www.sun.com if you need additional
024:         * information or have any questions.
025:         */
026:
027:        package com.sun.cdc.i18n.j2me;
028:
029:        /** 
030:         * Character conversion base class
031:         */
032:        class Conv {
033:            /**
034:             * Native method to get a handle to specific character 
035:             * encoding conversion routine.
036:             *
037:             * @param encoding character encoding
038:             * @return identifier for requested handler, or -1 if
039:             * the encoding was not supported.
040:             */
041:            native static int getHandler(String encoding);
042:
043:            /**
044:             * Native function to set the maximum length in bytes 
045:             * for a converted string.
046:             *
047:             * @param handler handle returned from getHandler
048:             * @return maximum byte length, or zero if handler
049:             * is not valid
050:             * @see #getHandler
051:             */
052:            native static int getMaxByteLength(int handler);
053:
054:            /**
055:             * Get the length of a specific converted string.
056:             *
057:             * @param handler handle returned from getHandler
058:             * @param b buffer of bytes to be converted
059:             * @param offset offset into the provided buffer
060:             * @param len length of data to be processed
061:             * @return length of the converted string, or zero
062:             * if arguments were not valid
063:             * @see #getHandler
064:             */
065:            native static int getByteLength(int handler, byte[] b, int offset,
066:                    int len);
067:
068:            /**
069:             * Native function to convert an array of bytes to 
070:             * converted array of characters.
071:             *
072:             * @param handler handle returned from getHandler
073:             * @param input buffer of bytes to be converted
074:             * @param in_offset offset into the provided buffer
075:             * @param in_len length of data to be processed
076:             * @param output buffer of converted bytes
077:             * @param out_offset offset into the provided output buffer
078:             * @param out_len length of data processed
079:             * @return length of the converted string, or zero if
080:             * the arguments were not valid
081:             * @see #getHandler
082:             */
083:            native static int byteToChar(int handler, byte[] input,
084:                    int in_offset, int in_len, char[] output, int out_offset,
085:                    int out_len);
086:
087:            /**
088:             * Native function to convert an array of characters
089:             * to an array of converted characters.
090:             *
091:             * @param handler handle returned from getHandler
092:             * @param input buffer of bytes to be converted
093:             * @param in_offset offset into the provided buffer
094:             * @param in_len length of data to be processed
095:             * @param output buffer of converted bytes
096:             * @param out_offset offset into the provided output buffer
097:             * @param out_len length of data processed
098:             * @return length of the converted string, or zero if 
099:             * the arguments were not valid
100:             * @see #getHandler
101:             */
102:            native static int charToByte(int handler, char[] input,
103:                    int in_offset, int in_len, byte[] output, int out_offset,
104:                    int out_len);
105:
106:            /**
107:             * Native function to get the length of a specific 
108:             * converted string as an array of Unicode bytes.
109:             *
110:             * @param handler handle returned from getHandler
111:             * @param b buffer of bytes to be converted
112:             * @param offset offset into the provided buffer
113:             * @param length length of data to be processed
114:             * @return length of the converted string, or zero
115:             * if the arguments were not valid
116:             * @see #getHandler
117:             */
118:            native static int sizeOfByteInUnicode(int handler, byte[] b,
119:                    int offset, int length);
120:
121:            /**
122:             * Native function to get the length of a specific 
123:             * converted string as an array of Unicode characters.
124:             *
125:             * @param handler handle returned from getHandler
126:             * @param c buffer of characters to be converted
127:             * @param offset offset into the provided buffer
128:             * @param length length of data to be processed
129:             * @return length of the converted string, or zero
130:             * if the arguments were not valid
131:             * @see #getHandler
132:             */
133:            native static int sizeOfUnicodeInByte(int handler, char[] c,
134:                    int offset, int length);
135:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.