United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6292322 unexpected exception occurs in InputStreamReader for UTF-16, little endian, and Byte-order-mark
JDK-6292322 : unexpected exception occurs in InputStreamReader for UTF-16, little endian, and Byte-order-mark

Details
Type:
Bug
Submit Date:
2005-06-29
Status:
Resolved
Updated Date:
2014-02-27
Project Name:
JDK
Resolved Date:
2006-02-21
Component:
core-libs
OS:
windows_xp
Sub-Component:
java.nio.charsets
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0u4
Fixed Versions:
1.4.2_12 (b01)

Related Reports
Backport:
Backport:
Relates:
Relates:
Relates:

Sub Tasks

Description
unexpected exception occurs for UTF-16, little endian, and Byte-order-mark stream.

REPRODUCE :
 1) Compiler attached program
 2) Launch "java TEST2 TEST2.xml"

You will see the following message.

C:\users\issues\unicode\TEST2>java -showversion TEST2 TEST2.xml
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
sun.io.MalformedInputException: Incorrect byte-order mark
        at sun.io.ByteToCharUnicode.convert(ByteToCharUnicode.java:141)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:2
48)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:298)

        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
        at sun.nio.cs.StreamDecoder.read0(StreamDecoder.java:132)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:118)
        at java.io.InputStreamReader.read(InputStreamReader.java:151)
        at TEST2.main(TEST2.java:22)

CONFIGURATION :
 JRE/JDK : 1.4.2/5.0u4
 OS      : WinXP(SP1, Japanese)
###@###.### 2005-06-29 16:26:48 GMT

                                    

Comments
EVALUATION

6230129
###@###.### 2005-06-29 17:13:06 GMT
                                     
2005-06-29



Hardware and Software, Engineered to Work Together