Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #26244
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: End of String Problem: Sending C++ string to java code |
| Date | 2013-10-08 20:30 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <l3283f$r6r$1@dont-email.me> (permalink) |
| References | <177b1b66-ea89-4995-ab6c-9187bb754895@googlegroups.com> <string-20131009000109@ram.dialup.fu-berlin.de> <serializer-20131009003629@ram.dialup.fu-berlin.de> <serialization-20131009005533@ram.dialup.fu-berlin.de> <deserialize-20131009022202@ram.dialup.fu-berlin.de> |
On 10/8/2013 8:22 PM, Stefan Ram wrote:
> ram@zedat.fu-berlin.de (Stefan Ram) writes:
>> template< typename S >void serialize( S const s )
>
> The deserializer in Java, a draft, not extensively tested:
>
> public final class Main
> {
> public static java.lang.Object deserialize( final java.lang.String s )
> throws java.lang.Throwable
> { return new javax.script.ScriptEngineManager().getEngineByName( "JavaScript" )
> .eval( s.replace( "{", "[" ).replace( "}", "]" ) +" .join( '' )" ); }
>
> public static void main( final java.lang.String[] args )
> throws java.lang.Throwable
> { java.lang.System.out.println( deserialize( "{ '\\x61', '\\x62', '\\x63' }" )); }}
Granted, "efficiency" is a dirty word nowadays ...
... but ...
... really? Is this what it takes to transport a String
across the JNI/Java interface? REALLY?
(Not a JNI expert, just someone about to barf.)
--
Eric Sosman
esosman@comcast-dot-net.invalid
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
End of String Problem: Sending C++ string to java code clusardi2k@aol.com - 2013-10-08 09:56 -0700
Re: End of String Problem: Sending C++ string to java code Arivald <NOSPAMarivald@interia.pl> - 2013-10-08 20:05 +0200
Re: End of String Problem: Sending C++ string to java code Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-10-08 11:13 -0700
Re: End of String Problem: Sending C++ string to java code Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-10-08 20:30 -0400
Re: End of String Problem: Sending C++ string to java code Mark <i@dontgetlotsofspamanymore.invalid> - 2013-10-09 15:29 +0100
Re: End of String Problem: Sending C++ string to java code "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-10-09 15:35 +0100
Re: End of String Problem: Sending C++ string to java code Jim Janney <jjanney@shell.xmission.com> - 2013-10-09 10:50 -0600
Re: End of String Problem: Sending C++ string to java code Jim Janney <jjanney@shell.xmission.com> - 2013-10-09 11:03 -0600
csiph-web