Article View: borland.public.jbuilder.java.language
Article #16728dumb questions...
From: Ted Holden
Date: Mon, 25 Jan 1999 00:00
Date: Mon, 25 Jan 1999 00:00
35 lines
1913 bytes
1913 bytes
I am planning to convert a fairly large application from C++ to Java, and have just now gotten to the point of having read enough about Java and played with jbuilder enough to get up the nerve to attempt it. My application needs to deal with large bitmap images, and to read and write them without taking all day doing it. In C/C++, I use fopen statements with the binary (b) flag set and then fread and fwrite statements using something akin to sector-sized reads, e.g. fread(buff, 4096, 1, stream); I assume the nearest thing to that in Java would be the ByteArrayInputStream class and its associated read and write statements. Is that correct or is there a better choice there somewhere? Also, I don't see anything resembling a particular flag for binary files with ByteArrayInputStream; can I assume that byte streams are assumed binary? Generally, you do cobol-like io in C/C++ by using structures and then fread/fwrite statements which look like: fread(&structAitem, sizeof(struct A), 1, stream) etc. What would be the equivalent of that in Java? Keeping track of arrays of file names: I use CStringArray lists in VC++ and associative arrays in Tcl: what's best in Java? It looks like you have a vector class and then a container class package. DLL's? Am I correct in assuming that DLL's and shared libraries would make no sense and don't exist within the Java world and, if so, what exactly (I would guess packages) takes their place. Ted Holden medved@ix.deniz.com
Technical Details
Message-ID:
<36ace373.601230453@news1.deniz.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,95ed8e504cbe83d2,start X-Google-Attributes: gidf74b3,public From: medved@ix.deniz.com (Ted Holden) Subject: dumb questions... Date: 1999/01/25 Message-ID: <36ace373.601230453@news1.deniz.com> X-Deja-AN: 436836145 X-Trace: 25 Jan 1999 16:13:33 EDT, 38.30.47.90 Newsgroups: borland.public.jbuilder.java.language