• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

c++ equivalent

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i am integrating java and dotnet through jni. in dotnet i am using word library to read data and metadata of a existing document. in java i m writing the native code to call the methods.
please tell me what is c++ equivalent of inputstream object in java and in dotnet
thanks and regards
yathish
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer really depends on your requirements. Do you want to use traditional Standard C Library functions like fopen()? new-style C++ I/O classes and templates? the native Win32 API functions for file I/O? Or, are you free to choose your own library?

If you're free to choose your own library, the closest equivalent for Java's InputStream is provided by NewJ Library for C++. With NewJ, if you want a 100% native C++ equivalent the answer is ::java::io::InputStream. On the other hand, if you need to interoperate with and read from the JRE-created object instance of InputStream, the answer is ::newjni::java::io::InputStream. It's that simple.

NewJ Library is available from http://www.pure-native.com/newj.html

If you need to use the other aforementioned libraries, you might want to see the following two books:
C++ For Java Programmers
C# for Java Programmers (Microsoft Press)
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic