classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java.nio.CharBuffer should implement java.lang.CharSequence


From: Michael Koch
Subject: Re: java.nio.CharBuffer should implement java.lang.CharSequence
Date: Fri, 22 Nov 2002 16:30:22 +0100
User-agent: KMail/1.4.7

Am Freitag, 22. November 2002 16:18 schrieb Brian Jones:
> Michael Koch <address@hidden> writes:
> > > --- gnu/java/nio/CharBufferImpl.java.orig Fri Nov 22 18:34:47
> > > 2002 +++ gnu/java/nio/CharBufferImpl.java Fri Nov 22 18:42:19
> > > 2002 @@ -170,4 +170,19 @@
> > >
> > >      return super.toString();
> > >    }
> > > +
> > > +  // There must be a better way of doing the following.
> > > +  public CharSequence subSequence(int start, int end)
> > > +  {
> > > +      return toString().substring(start, end);
> > > +  }
> > > +  public int length()
> > > +  {
> > > +      return toString().length();
> > > +  }
> > > +  public char charAt(int i)
> > > +  {
> > > +      return toString().charAt(i);
> > > +  }
> > > +
> > >  }
>
> Doesn't this make it difficult to have a char buffer greater than
> the maximum length of String?  Is this what the API recommends?

Have you looked at the patch I commited ?


Michael
-- 
Homepage: http://www.worldforge.org/
GPG-key: http://konqueror.dyndns.org/~mkoch/michael.gpg





reply via email to

[Prev in Thread] Current Thread [Next in Thread]