This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Scheme string to Java char[]?


Hoehle, Joerg-Cyril wrote:
> Hi,
> 
> I figured out that it would suffice to create a Java char[] object to be able to invoke the XMLParser
>     http://www.gnu.org/software/kawa/api/gnu/xml/XMLParser.html
> on an internal string instead of a URL. XMLParser fetches the document from the URL anyway and calls XMLParser(on char[] ...) internally.
> 
> I tried creating instances of <byte[]> or <char[]>, :: type indications but only got various error messages.
> This sounds like a pure Java question?

You can use the toCharArray method to get a char[]:

(invoke "some Scheme string" 'toCharArray)

Or you can create a char[] using primitive-array-new (see the manual).
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]