How about:

  String myString = null;
  if (newQfLibelleArray[i] instanceof String) {
     myString = newQfLibelleArray[i];  
  } else { // every class has a toString method, the result of
           // which may not be very useful...
     myString = newQfLibelleArray[i].toString();
  }

Best Regards,

Addison

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Marco Cimarosti
> Sent: Thursday, September 12, 2002 5:12 AM
> To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
> Subject: RE: Problems converting from UTF-8 to UCS-2 and vice-versa
> using JRun 3.1, SQL Server 2000, Windows 2000 and Java 3.1
> 
> 
> I (Marco Cimarosti wrote):
> > [...] doesn't (newQfLibelleArray[i]) have a method to 
> > return a <String> object directly?
> 
> Perhaps I have been clumsy. By "returning a <String> object directly" I
> meant, can't you so something like this:
> 
>       String tempUtf16 = new String( (newQfLibelleArray[i]) );
> 
> Or perhaps:
> 
>       String tempUtf16 = new String( (newQfLibelleArray[i]).getString() );
>       String tempUtf16 = new String( (newQfLibelleArray[i]).getText() );
>       String tempUtf16 = new String( (newQfLibelleArray[i]).String() );
>       String tempUtf16 = new String( (newQfLibelleArray[i]).Text() );
> 
> Or whatever the actual method's name is.
> 
> _ Marco
> 
> 


Reply via email to