Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

c++ equivalent  RSS feed

 
yathish Gatty
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
 
Dom King
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)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!