/[classpath]/classpath/java/io/InputStreamReader.java
ViewVC logotype

Diff of /classpath/java/io/InputStreamReader.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16.2.7 by gnu_andrew, Tue Sep 20 18:46:26 2005 UTC revision 1.16.2.8 by gnu_andrew, Sun Nov 27 21:00:37 2005 UTC
# Line 249  public class InputStreamReader extends R Line 249  public class InputStreamReader extends R
249      this.in = in;      this.in = in;
250      this.decoder = decoder;      this.decoder = decoder;
251    
252        Charset charset = decoder.charset();
253      try {      try {
254          maxBytesPerChar = decoder.charset().newEncoder().maxBytesPerChar();        if (charset == null)
255            maxBytesPerChar = 1f;
256          else
257            maxBytesPerChar = charset.newEncoder().maxBytesPerChar();
258      } catch(UnsupportedOperationException _){      } catch(UnsupportedOperationException _){
259          maxBytesPerChar = 1f;          maxBytesPerChar = 1f;
260      }      }
# Line 258  public class InputStreamReader extends R Line 262  public class InputStreamReader extends R
262      decoder.onMalformedInput(CodingErrorAction.REPLACE);      decoder.onMalformedInput(CodingErrorAction.REPLACE);
263      decoder.onUnmappableCharacter(CodingErrorAction.REPLACE);      decoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
264      decoder.reset();      decoder.reset();
265      encoding = EncodingHelper.getOldCanonical(decoder.charset().name());            if (charset == null)
266          encoding = "US-ASCII";
267        else
268          encoding = EncodingHelper.getOldCanonical(decoder.charset().name());      
269    }    }
270        
271    /**    /**

Legend:
Removed from v.1.16.2.7  
changed lines
  Added in v.1.16.2.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26