c  « Development « Java I/O Q&A





1. Reading VC++ CArchive Binary Format (or Java reading (CObArray))    stackoverflow.com

Is there any clear documentation on the binary formats used to serialize the various MFC data structures? I've been able to view some of my own classes in a hex ...

2. Why didn't header files catch on in other programming languages?    stackoverflow.com

Based on the response to this question: Why does C++ have header files and CPP I have seen the responses and understand the answers - so why didn't this catch on? ...

3. MFC Equivalent to Java File#isDirectory()    stackoverflow.com

Is there an equivalent to the Java File method isDirectory() in MFC? I tried using this :


static bool isDirectory(CString &path) {
  return GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY;   
}
but it doesn't ...

4. C#/Java programmer learning C++ again. Project file structure?    stackoverflow.com

As the question states, i am a C#/Java programmer who is interested in (re)learning C++. As you know C#/Java have a somewhat strict project file structure (especially Java). I find this ...

5. Did I read somewhere that C++/CLI moves us towards a "header-file" less society, like Java    stackoverflow.com

And if so, should I be trying to keep header file use to a minimum when creating classes? thx

6. read a int from a file wrote by java's writeInt method in C++?    stackoverflow.com

How would one go about doing this? Also, is there an easy way to do it? Using a lib like Boost or something?

7. Best way to serialize a Float in java to be read by C++ app?    stackoverflow.com

I need to serialize a java Float to be read by an application written in C++ over Socket comms. Is there a standard for this? It would be easiest to use ...

8. Is there a non-java, cross platform way to launch the associated application for a certain file type?    stackoverflow.com

First, I found a couple of java specific questions and answers for this. I am looking for more "native", but cross platform solution, using C, C++, some kind of ...

9. Creating Java object with boost::posix_time::ptime serialized XML representation    stackoverflow.com

I have following XML generated by serializing a boost::posix_time::ptime structure. I want to create a Java Date object with this XML.

<timeStamp class_id="0" tracking_level="0" version="0">
    <ptime_date class_id="1" tracking_level="0" version="0">
 ...





10. How to include all boost header files?    stackoverflow.com

In Java if you wanted all the classes in a namespace you could just do this:

import com.bobdylan.*;
Is there anyway I can get a result similar to:
import boost.*;
(except in C++)

11. Are there C++ equivalents for the Protocol Buffers delimited I/O functions in Java?    stackoverflow.com

I'm trying to read / write multiple Protocol Buffers messages from files, in both C++ and Java. Google suggests writing length prefixes before the messages, but there's no way to do ...

12. Is it possible to Serialize and Deserialize objects in C++?    stackoverflow.com

As we know c++ is also an Object Oriented Programming language where most the things are objects like java. So wanted to know is the Serialize and deserializ features are available ...

13. How to make a program that automatically synchronizes    stackoverflow.com

Hey i am hoping to write a program where the program automatically just copy pastes all my dad's documents from D:\office folder. So whenever I plug-in my pen-drive , the program ...

14. Looking for Find in files that supports all formats (in c++ or java)    stackoverflow.com

How does for example components like the "Total Commander " search can open every file format And search inside it ? Is there free library that offer me such feature ? Basically ...

15. The fastest way to save large data to a file    stackoverflow.com

I do some numerical calculation in Java, C# and C++. Some of them save a lot of data (to the text file). What is the fastest way to do it? C++.

ofstream ...

16. C/C++/Java Design Question: Keeping Track of Many Variables by Saving To File and Parsing Afterwards    stackoverflow.com

Suppose I have a game written in C/C++. For simplicity, I have:

struct masterStruct
{
       Coords player1;
       Weapon player1;
  ...





17. Converting from Java to C++ Reading a File, and parsing    stackoverflow.com

The Text file looks like this:

Apple,Itunes,1,7.3   
Microsoft,Windows Media Player,1,10
.... and so on..... The parse method is:
private IApplication parseLineToApp(String lineFromTxtFile) {
  Scanner lineScanner = new Scanner(lineFromTxtFile);
  lineScanner.useDelimiter(",");

  return ...

18. How to get undecoded filename    stackoverflow.com

Could somebody please give me some tips about how to get undecoded byte[] of filename? I want to do the decoding myself. I have traced java src code, but I am blocked by ...

19. How to convert a Java object into a C++ object?    stackoverflow.com

My problem is like this. I have serialized binary Java objects stored in files. I need to reconstruct the objects in C++ and do further process. I think I can deserialize the ...

20. Transitioning from java to C++    stackoverflow.com

Based both on when the languages were invented and the structure of the languages, this transition is probably meant to go the other way, but I am fairly confident in my ...

21. Is it possible to prepend data to an file without rewriting?    stackoverflow.com

I deal with very large binary files ( several GB to multiple TB per file ). These files exist in a legacy format and upgrading requires writing a header to the ...

22. Is programming against interfaces in Java the same concept as using header files in C/C++?    stackoverflow.com

The java code I'm working on at the moment has often a structure like file Controller.java:

interface Controller {...}
file ControllerImpl.java:
class ControllerImpl implements Controller {...}
But for every interface there is only one implementation. Isn't ...

23. Improvement on flag files and data files?    stackoverflow.com

I have a existing project (non-web), with multiple components/programs running on different machines. The programs use flag files e.g. "xxx.request" "xxx.done" to signal each other. And also data files are created ...

24. Advantages/Disadvantages of Header Files    stackoverflow.com

What are the advantages and disadvantages of using header files in a language like C or C++ verses a language like Java? I think classes should be designed from the ...

25. C++ IO vs Java IO    stackoverflow.com

Note that this is NOT a "better-than" discussion. I'm a Java programmer, and it makes me feel incredibly dumb not to know how to do very much C++ file IO. I need to ...

26. Create a networked virtual HDD/file system    stackoverflow.com

How would i go about creating a networked virtual HDD/file system? By that I mean, once I install the application a new drive (possibly need to create a driver?) shows up ...

27. OpenCV how can i detect webcam and compare the local file to match face    stackoverflow.com

The highlighted code demonstrate openCV framework is loaded in my C code and it render Police watching. Which is just to demonstrate it works very smooth and very clean code to ...

28. Equivalent of boost xml (nvp) serialization in java    stackoverflow.com

I am moving from C++ to Java, and I am used to the way boost serialization works for xml. What is very good with it is:

  1. that I only have to write ...

29. Binary serialization protocol    stackoverflow.com

I have a requirement where i need to transfer information through the wire(binary over tcp) between 2 applications. One is in Java and the other in C++. I need a protocol ...

30. How to read file created by C++ program in java?    stackoverflow.com

I have one file created by c++ program which is in encrypted format. I want to read it in my java program. In case of decryption of file contents, decryption algorithm ...

31. Are c++ header (.h) files like interfaces in C#/Java?    stackoverflow.com

Possible Duplicate:
Help a C++ newbie understand his mistakes: header files and cpp files
Are c++ header (.h) files like interfaces in C#/Java ? What are ...

32. Is it correct that header files in C++ and abstract class/interface implementations in Java are both the same idea?    stackoverflow.com

I am a little with familiar with C++ and I know that for almost every header file, I must create source file to go with it. Now I am looking into java ...

33. Can you access a pointer created in c++, in java    stackoverflow.com

Is it possible to access a pointer created in c++ in java? Like if I make a string, and make a pointer for the variable (giving the variable a memory place) ...

34. how to save an sensor_msgs/Image to a file?    stackoverflow.com

I am trying to pass an image from a Ros node(C++) to a ROSjava node. I managed to make the rosjava node to subscribe to the others topic. The C++ is ...

35. Reading data from file in an object (Simulation of "fread " function of c++    coderanch.com

Hi all See if possible or not ? I want to read data from a file , in a structure(wait i know there is no strut. in java)from a file having just stream of bytes..(As we do in C++ Fread(),Fwrite() functions). Is it possible that we can define a class having Fields as that in struct. and create an object of ...

36. How do I send the output of ExceptionDescribe in C++ to a file or a string?    coderanch.com

I'm writing VC++ COM wappers for java classes, for supporting Microsoft clients. Inside the COM DLL i'm starting the JVM (IBM 1.4.1) and making calls through JNI. I'm getting an exception and call ExceptionOccurred, ExceptionDescribe and ExceptionClear to gather the important details of the exception. The output of ExceptionDescribe goes nowhere though, even if I redirect stderr to a file. Any ...

37. How to read a C++-struct-constructed Binary Data    coderanch.com

Hello... thanks for the reply! Here's my way of extracting the data: try { RandomAccessFile rf = new RandomAccessFile(binFile, "r"); out.println("First 8 bytes (u long long): "+rf.readLong()); out.println("Second 8 bytes (double): " + rf.readDouble()); rf.close(); } catch (IOException io) { io.printStackTrace(); } And here is my result: First 8 bytes (u long long): 698548247152558080 Second 8 bytes (double): 6.231235E-317 I am ...

38. Reading a file written by c++, or is there any other way?    coderanch.com

Hi, I'm using JNI to capture key events typed by a user and writing them into a file. I do this using C++. I'm using Java to match the sentence being typed by the user with a sentence already present in a flat file. Here is the problem: The C++ code which captures all the keys presses by the user and ...

39. passing an entire file to a c++ function    java-forums.org

public int getChunk(byte[][] data, boolean isPreset) { int length = 0; data = new byte[1][1]; String fileName="filename.zip"; File zipFile=new File(fileName); FileInputStream fis=null; try { fis = new FileInputStream(zipFile); } catch (FileNotFoundException ex) { Logger.getLogger(myclass.getName()).log(Level.SEVERE, null, ex); } length=(int)zipFile.length();data[0]=new byte[length]; try { fis.read(data[0], 0, length); } catch (IOException ex) { Logger.getLogger(myclass.getName()).log(Level.SEVERE, null, ex); } length = data[0].length; try { fis.close(); } catch ...

40. How to change a java file to a C++ file.    forums.oracle.com

String strDatum = JOptionPane.showInputDialog( "Enter datum - a negative value to terminate:" ) ; datum = Integer.parseInt( strDatum ) ; while ( datum >= 0 ) { total+= datum ; count++ ; strDatum = JOptionPane.showInputDialog( "Enter next datum - a negative value to terminate:" ) ; datum = Integer.parseInt( strDatum ) ; } if ( count > 0 ) { System.out.println( ...

42. java package and c++ header files    forums.oracle.com

I do not know .. have been away from C/C++ for a long time... As much as I remember you can only import one header file each time... also when you import a header file you can just call methods from the header file automatically ... However I could be very wrong on this .. really lost touch from C/C++ ... ...