Re: Constructing java.lang.String in constant pool

2001-06-29 Thread Jochen Hoenicke
On Jun 28, Tom Tromey wrote: > > "Patrick" == Patrick Doyle <[EMAIL PROTECTED]> writes: > > Patrick> What is the best way for a JVM to instantiate a String for a > Patrick> constant pool entry of type "CONSTANT_String"? > > Use the JNI `NewString' call. It takes a nul-terminated UTF-8 encod

Re: Constructing java.lang.String in constant pool

2001-06-28 Thread Tom Tromey
> "Patrick" == Patrick Doyle <[EMAIL PROTECTED]> writes: Patrick> What is the best way for a JVM to instantiate a String for a Patrick> constant pool entry of type "CONSTANT_String"? Use the JNI `NewString' call. It takes a nul-terminated UTF-8 encoded `char *' and returns a jstring. The t

Re: Constructing java.lang.String in constant pool

2001-06-28 Thread Patrick Doyle
On 28 Jun 2001, Brian Jones wrote: > Patrick Doyle <[EMAIL PROTECTED]> writes: > > > The closest thing to sanity I can think of is to convert the UTF8-encoded > > characters into a char array and then use the String(char[], length) > > constructor. AFAIK I would have to implement the conversion

Re: Constructing java.lang.String in constant pool

2001-06-28 Thread Brian Jones
Patrick Doyle <[EMAIL PROTECTED]> writes: > What is the best way for a JVM to instantiate a String for a constant pool > entry of type "CONSTANT_String"? I'm looking for the most straightforward > approach that won't cause me a lot of grief down the road. There are a > number of constructors fo

Constructing java.lang.String in constant pool

2001-06-27 Thread Patrick Doyle
What is the best way for a JVM to instantiate a String for a constant pool entry of type "CONSTANT_String"? I'm looking for the most straightforward approach that won't cause me a lot of grief down the road. There are a number of constructors for String; should I use one of those, or just use m