Java Doc for CharsetDecoderICU.java in  » Internationalization-Localization » icu4j » com » ibm » icu » charset » 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 » Internationalization Localization » icu4j » com.ibm.icu.charset 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.ibm.icu.charset.CharsetDecoderICU

CharsetDecoderICU
abstract public class CharsetDecoderICU extends CharsetDecoder (Code)
An abstract class that provides framework methods of decoding operations for concrete subclasses. In the future this class will contain API that will implement converter sematics of ICU4C.


Field Summary
 char[]charErrorBufferArray
    
 intcharErrorBufferBegin
    
 intcharErrorBufferLength
    
 char[]invalidCharBuffer
    
 intinvalidCharLength
    
 intmode
    
 byte[]preToUArray
    
 intpreToUBegin
    
 intpreToUFirstLength
    
 intpreToULength
    
 CharsetCallback.DecodertoCharErrorBehaviour
    
 byte[]toUBytesArray
    
 inttoUBytesBegin
    
 ObjecttoUContext
    
 inttoULength
    
 inttoUnicodeStatus
    

Constructor Summary
 CharsetDecoderICU(CharsetICU cs)
     Construct a CharsetDecorderICU based on the information provided from a CharsetICU object.
Parameters:
  cs - The CharsetICU object containing information about how tocharset to decode.

Method Summary
 CoderResultcbToUWriteSub(CharsetDecoderICU decoder, ByteBuffer source, CharBuffer target, IntBuffer offsets)
     This function will write out the Unicode substitution character to the target character buffer.
final  CoderResultdecode(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush)
     Implements the ICU semantic for decode operation
Parameters:
  source - The input byte buffer
Parameters:
  target - The output character buffer
Parameters:
  offsets -
Parameters:
  flush - true if, and only if, the invoker can provide noadditional input bytes beyond those in the given buffer.
protected  CoderResultdecodeLoop(ByteBuffer in, CharBuffer out)
     Decodes one or more bytes.
abstract  CoderResultdecodeLoop(ByteBuffer in, CharBuffer out, IntBuffer offsets, boolean flush)
     Implements the ICU semantic for decode operation
Parameters:
  in - The input byte buffer
Parameters:
  out - The output character buffer Result of decoding action.
final protected  CoderResultimplFlush(CharBuffer out)
     Flushes any characters saved in the converter's internal buffer and resets the converter.
Parameters:
  out - action to be taken result of flushing action and completes the decoding all input.
final protected  voidimplOnMalformedInput(CodingErrorAction newAction)
    
final protected  voidimplOnUnmappableCharacter(CodingErrorAction newAction)
    
protected  voidimplReset()
    
 inttoUCountPending()
     Returns the number of chars held in the converter's internal state because more input is needed for completing the conversion.
final static  CoderResulttoUWriteUChars(CharsetDecoderICU cnv, char[] ucharsArray, int ucharsBegin, int length, CharBuffer target, IntBuffer offsets, int sourceIndex)
     ONLY used by ToU callback functions.
final  CoderResulttoUnicodeWithCallback(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush)
    

Field Detail
charErrorBufferArray
char[] charErrorBufferArray(Code)



charErrorBufferBegin
int charErrorBufferBegin(Code)



charErrorBufferLength
int charErrorBufferLength(Code)



invalidCharBuffer
char[] invalidCharBuffer(Code)



invalidCharLength
int invalidCharLength(Code)



mode
int mode(Code)



preToUArray
byte[] preToUArray(Code)



preToUBegin
int preToUBegin(Code)



preToUFirstLength
int preToUFirstLength(Code)



preToULength
int preToULength(Code)



toCharErrorBehaviour
CharsetCallback.Decoder toCharErrorBehaviour(Code)



toUBytesArray
byte[] toUBytesArray(Code)



toUBytesBegin
int toUBytesBegin(Code)



toUContext
Object toUContext(Code)



toULength
int toULength(Code)



toUnicodeStatus
int toUnicodeStatus(Code)




Constructor Detail
CharsetDecoderICU
CharsetDecoderICU(CharsetICU cs)(Code)
Construct a CharsetDecorderICU based on the information provided from a CharsetICU object.
Parameters:
  cs - The CharsetICU object containing information about how tocharset to decode.




Method Detail
cbToUWriteSub
CoderResult cbToUWriteSub(CharsetDecoderICU decoder, ByteBuffer source, CharBuffer target, IntBuffer offsets)(Code)
This function will write out the Unicode substitution character to the target character buffer. Sub classes to override this method if required
Parameters:
  decoder -
Parameters:
  source -
Parameters:
  target -
Parameters:
  offsets - A CoderResult object that contains the error result when an error occurs.



decode
final CoderResult decode(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush)(Code)
Implements the ICU semantic for decode operation
Parameters:
  source - The input byte buffer
Parameters:
  target - The output character buffer
Parameters:
  offsets -
Parameters:
  flush - true if, and only if, the invoker can provide noadditional input bytes beyond those in the given buffer. Result of decoding action. Returns CoderResult.UNDERFLOW if the decodingaction succeeds or more input is needed for completing the decoding action.



decodeLoop
protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out)(Code)
Decodes one or more bytes. The default behaviour of the converter is stop and report if an error in input stream is encountered. To set different behaviour use @see CharsetDecoder.onMalformedInput() This method allows a buffer by buffer conversion of a data stream. The state of the conversion is saved between calls to convert. Among other things, this means multibyte input sequences can be split between calls. If a call to convert results in an Error, the conversion may be continued by calling convert again with suitably modified parameters.All conversions should be finished with a call to the flush method.
Parameters:
  in - buffer to decode
Parameters:
  out - buffer to populate with decoded result Result of decoding action. Returns CoderResult.UNDERFLOW if the decodingaction succeeds or more input is needed for completing the decoding action.



decodeLoop
abstract CoderResult decodeLoop(ByteBuffer in, CharBuffer out, IntBuffer offsets, boolean flush)(Code)
Implements the ICU semantic for decode operation
Parameters:
  in - The input byte buffer
Parameters:
  out - The output character buffer Result of decoding action. Returns CoderResult.UNDERFLOW if the decodingaction succeeds or more input is needed for completing the decoding action.



implFlush
final protected CoderResult implFlush(CharBuffer out)(Code)
Flushes any characters saved in the converter's internal buffer and resets the converter.
Parameters:
  out - action to be taken result of flushing action and completes the decoding all input. Returns CoderResult.UNDERFLOW if the action succeeds.



implOnMalformedInput
final protected void implOnMalformedInput(CodingErrorAction newAction)(Code)
Sets the action to be taken if an illegal sequence is encountered
Parameters:
  newAction - action to be taken
exception:
  IllegalArgumentException -



implOnUnmappableCharacter
final protected void implOnUnmappableCharacter(CodingErrorAction newAction)(Code)
Sets the action to be taken if an illegal sequence is encountered
Parameters:
  newAction - action to be taken
exception:
  IllegalArgumentException -



implReset
protected void implReset()(Code)
Resets the to Unicode mode of converter



toUCountPending
int toUCountPending()(Code)
Returns the number of chars held in the converter's internal state because more input is needed for completing the conversion. This function is useful for mapping semantics of ICU's converter interface to those of iconv, and this information is not needed for normal conversion. The number of chars in the state. -1 if an error is encountered.



toUWriteUChars
final static CoderResult toUWriteUChars(CharsetDecoderICU cnv, char[] ucharsArray, int ucharsBegin, int length, CharBuffer target, IntBuffer offsets, int sourceIndex)(Code)
ONLY used by ToU callback functions. This function will write out the specified characters to the target character buffer. A CoderResult object that contains the error result when an error occurs.



toUnicodeWithCallback
final CoderResult toUnicodeWithCallback(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush)(Code)



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