java.nio.charset

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » io nio » java.nio.charset 
java.nio.charset
Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.

Class name

Description

{@link java.nio.charset.Charset} A named mapping between characters
and bytes
{@link java.nio.charset.CharsetDecoder} Decodes bytes into characters
{@link java.nio.charset.CharsetEncoder}   Encodes characters into bytes
{@link java.nio.charset.CoderResult}   Describes coder results
{@link java.nio.charset.CodingErrorAction}   Describes actions to take when
coding errors are detected

A charset is named mapping between sequences of sixteen-bit Unicode characters and sequences of bytes, in the sense defined in RFC 2278. A decoder is an engine which transforms bytes in a specific charset into characters, and an encoder is an engine which transforms characters into bytes. Encoders and decoders operate on byte and character buffers. They are collectively referred to as coders.

The {@link java.nio.charset.Charset} class defines methods for creating coders for a given charset and for retrieving the various names associated with a charset. It also defines static methods for testing whether a particular charset is supported, for locating charset instances by name, and for constructing a map that contains every charset for which support is available in the current Java virtual machine.

Most users will not use these classes directly; instead they will use the existing charset-related constructors and methods in the {@link java.lang.String} class, together with the existing {@link java.io.InputStreamReader} and {@link java.io.OutputStreamWriter} classes, all of whose implementations have been reworked to make use of the charset facilities defined in this package. A small number of changes have been made to the {@link java.io.InputStreamReader} and {@link java.io.OutputStreamWriter} classes in order to allow explicit charset objects to be specified in the construction of instances of those classes.

Support for new charsets can be made available via the interface defined in the {@link java.nio.charset.spi.CharsetProvider} class in the {@link java.nio.charset.spi} package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown. @since 1.4 @version 1.8, 07/05/05 @author Mark Reinhold @author JSR-51 Expert Group

Java Source File NameTypeComment
Charset-X-Coder.javaClass An engine that can transform a sequence of $itypesPhrase$ into a sequence of $otypesPhrase$.

The input $itype$ sequence is provided in a $itype$ buffer or a series of such buffers.

Charset.javaClass A named mapping between sequences of sixteen-bit Unicode code units and sequences of bytes.
CoderMalfunctionError.javaClass Error thrown when the CharsetDecoder.decodeLoop decodeLoop method of a CharsetDecoder , or the CharsetEncoder.encodeLoopencodeLoop method of a CharsetEncoder , throws an unexpected exception.
CoderResult.javaClass A description of the result state of a coder.

A charset coder, that is, either a decoder or an encoder, consumes bytes (or characters) from an input buffer, translates them, and writes the resulting characters (or bytes) to an output buffer.

CodingErrorAction.javaClass A typesafe enumeration for coding-error actions.

Instances of this class are used to specify how malformed-input and unmappable-character errors are to be handled by charset decoders and encoders.

MalformedInputException.javaClass Checked exception thrown when an input byte sequence is not legal for given charset, or an input character sequence is not a legal sixteen-bit Unicode sequence.
UnmappableCharacterException.javaClass Checked exception thrown when an input character (or byte) sequence is valid but cannot be mapped to an output byte (or character) sequence.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.