Re: [Py4j-users] Create "new <object>"?
Status: Beta
Brought to you by:
barthe
From: Barthelemy D. <bar...@in...> - 2015-03-28 00:08:13
|
Hi, how about: data = gateway.jvm.java.io.ByteArrayInputStream(jsonData.getBytes("UTF-8")) References in the documentation: http://py4j.sourceforge.net/faq.html#how-to-call-a-constructor http://py4j.sourceforge.net/getting_started.html#collections-help-and-constructors On Fri, Mar 27, 2015 at 1:36 PM, Israel Brewster <is...@ra...> wrote: > Is there a way in py4j to call the java "new" command? That is, in java I > have some code like: > > InputStream data=new ByteArrayInputStream(jsonData.getBytes("UTF-8")); > > Is there a way to pull that across to the python side, or do I just have > to make a bunch of utility functions in Java for this? > > I'm trying to make the Jasper Reports library available to my python code, > and while it works for the most part I haven't yet figured out object > creation. Thanks. > ----------------------------------------------- > Israel Brewster > Systems Analyst II > Ravn Alaska > 5245 Airport Industrial Rd > Fairbanks, AK 99709 > (907) 450-7293 > ----------------------------------------------- > > > > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Py4j-users mailing list > Py4...@li... > https://lists.sourceforge.net/lists/listinfo/py4j-users > > |