This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

c++ equivalent  RSS feed

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • 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
  • 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)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!