Project

General

Profile

Task #3371

unmarshalTypeFromFile method is using FileReader

Added by Jing Tao over 11 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-10-29
Due date:
% Done:

0%

Milestone:
None
Product Version:
*
Story Points:
Sprint:

Description

The method - public static T unmarshalTypeFromFile(Class domainClass, File file), is using the FileReader object to reader the file. That means it uses the default character encoding. If we use the InpuStreamReader instead, we can specify the character encoding, e.g utf-8, which is good for internationalization.

If we want to stick to FileReader in this method ( we have unmarshalTypeFromStream(Class domainClass, InputStream inputStream) as the alternative), at least in the java doc we should let user know - it is use the default character encoding.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)