/[classpath]/classpath/java/lang/String.java
ViewVC logotype

Diff of /classpath/java/lang/String.java

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

revision 1.70 by tromey, Tue Sep 13 22:19:15 2005 UTC revision 1.71 by green, Fri Sep 16 15:59:02 2005 UTC
# Line 628  public final class String implements Ser Line 628  public final class String implements Ser
628          ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count));          ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count));
629          if(bbuf.hasArray())          if(bbuf.hasArray())
630            return bbuf.array();            return bbuf.array();
631            
632          // Doubt this will happen. But just in case.          // Doubt this will happen. But just in case.
633          byte[] bytes = new byte[bbuf.remaining()];          byte[] bytes = new byte[bbuf.remaining()];
634          bbuf.get(bytes);          bbuf.get(bytes);
635          return bytes;          return bytes;
636          }
637        } catch(IllegalCharsetNameException e){      catch(IllegalCharsetNameException e)
638            throw new UnsupportedEncodingException("Encoding: "+enc+        {
639                                                   " not found.");          throw new UnsupportedEncodingException("Encoding: " + enc
640        } catch(UnsupportedCharsetException e){                                                 + " not found.");
641            throw new UnsupportedEncodingException("Encoding: "+enc+        }
642                                                   " not found.");      catch(UnsupportedCharsetException e)
643        } catch(CharacterCodingException e){        {
644            // XXX - Ignore coding exceptions? They shouldn't really happen.          throw new UnsupportedEncodingException("Encoding: " + enc
645            return null;                                                 + " not found.");
646          }
647        catch(CharacterCodingException e)
648          {
649            // This shouldn't ever happen.
650            throw (InternalError) new InternalError().initCause(e);
651        }          }  
652    }    }
653    

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71

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