Need to map openConnection in C. Need Low level inputs for this.
posted 12 years ago
I need to map the function openConnection(URL Class), and setDoInput & setDoOutput(URLConnection Class) into C. Am not finding the proper place about where i would get the low level implementation of this. Also, is it possible to actually get the code through which these functions are written?
Please do lend a helping hand as soon as possible.
If you look in the root directory of your SDK directory you will see a src.zip file (if you installed sources). That contains the source for the classes you want. As for a direct map betweeen URL/URLConnection and something in C, I don't think there is anything very similar. C is a lower-level language than Java and Java hides a lot of details that one must deal with explicity in C. A quick Google search turned up this example for the GNU C library, in case you are using Linux. There's probably something very similar available in Win32.